WIP Prepare postgres for migration by replication

This commit is contained in:
2026-04-08 15:41:56 +04:00
parent 6583cd7010
commit bc3f291bd2
22 changed files with 748 additions and 7 deletions

View File

@@ -3,10 +3,6 @@
# Recipe:: replica
#
service postgresql_service do
supports restart: true, status: true, reload: true
end
postgresql_custom_server postgresql_version do
role "replica"
end
@@ -20,6 +16,9 @@ if primary.nil?
return
end
# TODO Replace pg.kosmos.local with private IP once available
# via proper node attribute
# https://gitea.kosmos.org/kosmos/chef/issues/263
execute "set up replication" do
command <<-EOF
systemctl stop #{postgresql_service}