Skip to content

Commit

Permalink
don't set data_directory in config when we configure it via env
Browse files Browse the repository at this point in the history
Fixes: #1576
  • Loading branch information
evgeni committed Feb 21, 2024
1 parent 411e7bc commit 4c46072
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 5 additions & 3 deletions manifests/server/instance/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,11 @@
}
}

postgresql::server::config_entry { "data_directory_for_instance_${name}":
key => 'data_directory',
value => $datadir,
unless $facts['service_provider'] == 'systemd' and $facts['os']['family'] in ['RedHat', 'Gentoo'] {
postgresql::server::config_entry { "data_directory_for_instance_${name}":
key => 'data_directory',
value => $datadir,
}
}
if $timezone {
postgresql::server::config_entry { "timezone_for_instance_${name}":
Expand Down
2 changes: 0 additions & 2 deletions spec/defines/server_instance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ class { 'postgresql::server':
it { is_expected.to contain_postgresql_conn_validator('validate_service_is_running_instance_test1') }
it { is_expected.to contain_postgresql_conf('port_for_instance_test1') }
it { is_expected.to contain_postgresql_conf('log_statement_stats_test1') }
it { is_expected.to contain_postgresql_conf('data_directory_for_instance_test1') }
it { is_expected.to contain_postgresql_conf('autovacuum_vacuum_scale_factor_test1') }
it { is_expected.to contain_postgresql_conf('authentication_timeout_test1') }
it { is_expected.to contain_postgresql__server__role('app_test1') }
Expand Down Expand Up @@ -159,7 +158,6 @@ class { 'postgresql::server':
it { is_expected.to contain_file('/opt/pgsql') }
it { is_expected.to contain_postgresql__server__config_entry('authentication_timeout_test1') }
it { is_expected.to contain_postgresql__server__config_entry('autovacuum_vacuum_scale_factor_test1') }
it { is_expected.to contain_postgresql__server__config_entry('data_directory_for_instance_test1') }
it { is_expected.to contain_postgresql__server__config_entry('log_statement_stats_test1') }
it { is_expected.to contain_postgresql__server__config_entry('password_encryption_for_instance_test1') }
it { is_expected.to contain_postgresql__server__config_entry('port_for_instance_test1') }
Expand Down

0 comments on commit 4c46072

Please sign in to comment.