Pass the data_directory to the postgresql_server_conf resource

Previously we were passing it as an additional config, but it is set by
default. The last value was used, the custom one, so the server still
used the correct file
This commit is contained in:
Greg Karékinian 2020-06-08 18:39:05 +02:00
parent e3e726097f
commit a0db6adaf2

View File

@ -64,8 +64,7 @@ action :create do
unix_socket_directories: "/var/run/postgresql",
dynamic_shared_memory_type: "posix",
timezone: "UTC", # default is GMT
listen_addresses: "0.0.0.0",
data_directory: postgresql_data_dir
listen_addresses: "0.0.0.0"
}
if new_resource.role == "replica"
@ -101,6 +100,7 @@ action :create do
postgresql_server_conf "main" do
version postgresql_version
data_directory postgresql_data_dir
additional_config additional_config
notifies :reload, "service[#{postgresql_service}]", :delayed
end