]>
Commit | Line | Data |
---|---|---|
f568173a IB |
1 | define profile::postgresql_master ( |
2 | $letsencrypt_host = undef, | |
3 | $backup_hosts = [], | |
4 | ) { | |
c53ac3f8 IB |
5 | profile::postgresql::ssl { "/var/lib/postgres": |
6 | cert => "/etc/letsencrypt/live/$letsencrypt_host/cert.pem", | |
7 | key => "/etc/letsencrypt/live/$letsencrypt_host/privkey.pem", | |
f568173a | 8 | require => Letsencrypt::Certonly[$letsencrypt_host], |
c53ac3f8 | 9 | } |
f568173a IB |
10 | |
11 | $backup_hosts.each |$backup_host| { | |
c53ac3f8 IB |
12 | profile::postgresql::replication { $backup_host: |
13 | handle_role => true, | |
14 | handle_slot => true, | |
15 | add_self_role => true, | |
f568173a | 16 | } |
5feedbb4 | 17 | } |
f568173a | 18 | } |