From a4a35da0ffadbf914ba642e546c9e1cb3167cf0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Sat, 23 Jan 2021 17:34:58 +0100 Subject: [PATCH] Replace the hardcoded primary pg IP with a hostname --- site-cookbooks/kosmos-postgresql/recipes/replica.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-cookbooks/kosmos-postgresql/recipes/replica.rb b/site-cookbooks/kosmos-postgresql/recipes/replica.rb index a5b82b9..6525948 100644 --- a/site-cookbooks/kosmos-postgresql/recipes/replica.rb +++ b/site-cookbooks/kosmos-postgresql/recipes/replica.rb @@ -27,7 +27,7 @@ unless primary.nil? command <<-EOF systemctl stop #{postgresql_service} mv #{postgresql_data_dir} #{postgresql_data_dir}.old -pg_basebackup -h 10.1.1.167 -U replication -D #{postgresql_data_dir} -R +pg_basebackup -h pg.kosmos.local -U replication -D #{postgresql_data_dir} -R chown -R postgres:postgres #{postgresql_data_dir} systemctl start #{postgresql_service} EOF