- if version.to_f < 12 && (restore_command || standby_mode == "on")
- template "/var/lib/postgresql/#{version}/main/recovery.conf" do
- source "recovery.conf.erb"
- owner "postgres"
- group "postgres"
- mode "640"
- variables :standby_mode => standby_mode,
- :primary_conninfo => primary_conninfo,
- :restore_command => restore_command,
- :passwords => passwords
- notifies :reload, "service[postgresql]"
- only_if { ::Dir.exist?("/var/lib/postgresql/#{version}/main") }
- end
- else
- template "/var/lib/postgresql/#{version}/main/recovery.conf" do
- action :delete
- notifies :reload, "service[postgresql]"
- only_if { ::Dir.exist?("/var/lib/postgresql/#{version}/main") }
- end
- end
-
- if version.to_f > 11 && standby_mode == "on"