From 436cae5ebfd889b1bf625b757939a57842b564da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 28 Jun 2018 02:38:10 +0200 Subject: Rename file --- modules/profile/manifests/postgresql/master.pp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 modules/profile/manifests/postgresql/master.pp (limited to 'modules/profile/manifests/postgresql/master.pp') diff --git a/modules/profile/manifests/postgresql/master.pp b/modules/profile/manifests/postgresql/master.pp new file mode 100644 index 0000000..969905f --- /dev/null +++ b/modules/profile/manifests/postgresql/master.pp @@ -0,0 +1,20 @@ +define profile::postgresql::master ( + $letsencrypt_host = undef, + $backup_hosts = [], +) { + 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, + } + } +} -- cgit v1.2.3