roles::postgresql::server now sets up postgres::cluster for all clusters
[mirror/dsa-puppet.git] / modules / postgres / manifests / backup_cluster.pp
index cceb94e..172f33c 100644 (file)
@@ -30,6 +30,8 @@ define postgres::backup_cluster(
   Boolean $do_role = false,
   Boolean $do_hba = false,
 ) {
+  include postgres::backup_source
+
   $datadir = "/var/lib/postgresql/${pg_version}/${pg_cluster}"
   file { "${datadir}/.nobackup":
     content  => ''
@@ -58,21 +60,6 @@ define postgres::backup_cluster(
     }
   }
 
-  # Send connections to the port to the pg-backup chain
-  # there, the register_backup_clienthost class will have
-  # realized the exported allows from the backup servers.
-  #
-  # Any non-matching traffic will fall through and it can
-  # be allowed elsewhere
-  #
-  # this rule is only needed for clusters that we do not manage
-  # with postgres::cluster.  Hopefully these will go away with time
-  ferm::rule::simple { "dsa-postgres-backup-${pg_port}":
-    description => 'Check for postgres access from backup host',
-    port        => $pg_port,
-    target      => 'pg-backup',
-  }
-
   postgres::cluster::hba_entry { "backup-replication::${pg_version}::${pg_cluster}":
     pg_version => $pg_version,
     pg_cluster => $pg_cluster,