roles::debsources::db_address: bmdb1.debian.org
roles::debsources::db_port: 5440
+roles::postgresql::ftp_master_dak_replica::db_server: fasolo.debian.org
+roles::postgresql::ftp_master_dak_replica::db_port: 5433
+roles::postgresql::ftp_master_dak_replica::db_role: repuser
+
# == other variables
#####################
---
classes:
- roles::postgresql::server
+ - roles::postgresql::ftp_master_dak_replica
postgres::backup_server::register_backup_clienthost::allow_read_hosts: ['fasolo']
roles::postgresql::server::manage_clusters_hba: [5440]
--- /dev/null
+#
+# replica of the dak instance on ftp-master
+#
+# @param db_server address of the database server for ftp-master's dak
+# @param db_port port of the database cluster for ftp-master's dak
+# @param db_role replication user
+class roles::postgresql::ftp_master_dak_replica (
+ String $db_server,
+ Intger $db_port,
+ String $db_role,
+) {
+
+ @@postgres::cluster::hba_entry { 'dak-replica':
+ tag => "postgres::cluster::${db_port}::hba::${db_server}",
+ pg_port => $db_port,
+ database => 'replication',
+ user => $db_role,
+ address => $base::public_addresses,
+ }
+}