From: Peter Palfrader Date: Sat, 28 Sep 2019 18:50:49 +0000 (+0200) Subject: cleanup X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=a5118bb7ee4c0ed9c5cea3dcb2243738381467d6;p=mirror%2Fdsa-puppet.git cleanup --- diff --git a/data/common.yaml b/data/common.yaml index 8e1f05c9f..4abd2a244 100644 --- a/data/common.yaml +++ b/data/common.yaml @@ -30,7 +30,7 @@ roles::dns_primary::allow_access: - '194.146.105.25' - '2a01:3f0:0:27::24' - '2a01:3f0:0:28::25' -postgres::db_backup_role: 'debian-backup' +postgres::backup_cluster::db_backup_role: 'debian-backup' # bacula # bacula::email_all: 'bacula-reports@admin.debian.org' diff --git a/modules/postgres/manifests/backup_cluster.pp b/modules/postgres/manifests/backup_cluster.pp index 98c77bc8f..102f264a6 100644 --- a/modules/postgres/manifests/backup_cluster.pp +++ b/modules/postgres/manifests/backup_cluster.pp @@ -1,17 +1,17 @@ # Backup this cluster # # @param pg_version pg version of the cluster -# @param pg_backup_role replication role username # @param pg_cluster cluster name # @param pg_port port of the postgres cluster +# @param db_backup_role replication role username # @param db_backup_role_password password of the replication role # @param do_role create the role (requires setup with postgresql::server) # @param do_hba update pg_hba (requires setup with postgresql::server) define postgres::backup_cluster( String $pg_version, - String $db_backup_role = lookup('postgres::backup_cluster::db_backup_role'), String $pg_cluster = 'main', Integer $pg_port = 5432, + String $db_backup_role = lookup('postgres::backup_cluster::db_backup_role'), String $db_backup_role_password = hkdf('/etc/puppet/secret', "postgresql-${::hostname}-${$pg_cluster}-${pg_port}-backup_role}"), Boolean $do_role = false, Boolean $do_hba = false,