]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blob - modules/profile/manifests/postgresql/master.pp
Rename file
[perso/Immae/Projets/Puppet.git] / modules / profile / manifests / postgresql / master.pp
1 define profile::postgresql::master (
2 $letsencrypt_host = undef,
3 $backup_hosts = [],
4 ) {
5 profile::postgresql::ssl { "/var/lib/postgres/data":
6 cert => "/etc/letsencrypt/live/$letsencrypt_host/cert.pem",
7 key => "/etc/letsencrypt/live/$letsencrypt_host/privkey.pem",
8 require => Letsencrypt::Certonly[$letsencrypt_host],
9 handle_config_entry => true,
10 }
11
12 $backup_hosts.each |$backup_host| {
13 profile::postgresql::replication { $backup_host:
14 handle_config => true,
15 handle_role => true,
16 handle_slot => true,
17 add_self_role => true,
18 }
19 }
20 }