blob: 969905f7f3509cf7a59eea799c4ef4185f8709d6 (
plain) (
tree)
|
|
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,
}
}
}
|