]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/profile/manifests/postgresql_master.pp
Refactor backup postgresql
[perso/Immae/Projets/Puppet.git] / modules / profile / manifests / postgresql_master.pp
index e28c1b0add6567f79e0dc8feced8c86fe835d176..3de4f2283054da1e1254786f75406e7668f8452c 100644 (file)
@@ -2,14 +2,16 @@ define profile::postgresql_master (
   $letsencrypt_host = undef,
   $backup_hosts     = [],
 ) {
-  profile::postgresql::ssl { "/var/lib/postgres":
-    cert    => "/etc/letsencrypt/live/$letsencrypt_host/cert.pem",
-    key     => "/etc/letsencrypt/live/$letsencrypt_host/privkey.pem",
-    require => Letsencrypt::Certonly[$letsencrypt_host],
+  profile::postgresql::ssl { "/var/lib/postgres/data":
+    cert                => "/etc/letsencrypt/live/$letsencrypt_host/cert.pem",
+    key                 => "/etc/letsencrypt/live/$letsencrypt_host/privkey.pem",
+    require             => Letsencrypt::Certonly[$letsencrypt_host],
+    handle_config_entry => true,
   }
 
   $backup_hosts.each |$backup_host| {
     profile::postgresql::replication { $backup_host:
+      handle_config => true,
       handle_role   => true,
       handle_slot   => true,
       add_self_role => true,