Try something else to get a default for postgres::backup_cluster::db_backup_role
authorPeter Palfrader <peter@palfrader.org>
Sat, 28 Sep 2019 18:48:16 +0000 (20:48 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 28 Sep 2019 18:49:05 +0000 (20:49 +0200)
data/common.yaml
modules/postgres/manifests/backup_cluster.pp

index a4f5e82..8e1f05c 100644 (file)
@@ -30,7 +30,7 @@ roles::dns_primary::allow_access:
   - '194.146.105.25'
   - '2a01:3f0:0:27::24'
   - '2a01:3f0:0:28::25'
-postgres::backup_cluster::db_backup_role: debian-backup
+postgres::db_backup_role: 'debian-backup'
 # bacula
 #
 bacula::email_all: 'bacula-reports@admin.debian.org'
index bb61e93..98c77bc 100644 (file)
@@ -1,7 +1,15 @@
+# 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_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,
+  String $db_backup_role = lookup('postgres::backup_cluster::db_backup_role'),
   String $pg_cluster = 'main',
   Integer $pg_port = 5432,
   String $db_backup_role_password = hkdf('/etc/puppet/secret', "postgresql-${::hostname}-${$pg_cluster}-${pg_port}-backup_role}"),