blob: e28c1b0add6567f79e0dc8feced8c86fe835d176 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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],
}
$backup_hosts.each |$backup_host| {
profile::postgresql::replication { $backup_host:
handle_role => true,
handle_slot => true,
add_self_role => true,
}
}
}
|