Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For upgrades, should we ensure it's absent on systemd + RH/Gentoo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably yes?

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