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 ++++++++++++++++++++ modules/profile/manifests/postgresql_master.pp | 20 -------------------- modules/role/manifests/etherpad.pp | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 modules/profile/manifests/postgresql/master.pp delete mode 100644 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, + } + } +} diff --git a/modules/profile/manifests/postgresql_master.pp b/modules/profile/manifests/postgresql_master.pp deleted file mode 100644 index 3de4f22..0000000 --- a/modules/profile/manifests/postgresql_master.pp +++ /dev/null @@ -1,20 +0,0 @@ -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, - } - } -} diff --git a/modules/role/manifests/etherpad.pp b/modules/role/manifests/etherpad.pp index 109da96..28b9eb6 100644 --- a/modules/role/manifests/etherpad.pp +++ b/modules/role/manifests/etherpad.pp @@ -87,7 +87,7 @@ class role::etherpad ( subscribe => Aur::Package["etherpad-lite"], } - profile::postgresql_master { "postgresql master for etherpad": + profile::postgresql::master { "postgresql master for etherpad": letsencrypt_host => $web_host, backup_hosts => ["backup-1"], } -- cgit v1.2.3