unique postgres::cluster::hba_entry names for hosts with more than one cluster
authorPeter Palfrader <peter@palfrader.org>
Sun, 29 Sep 2019 10:43:19 +0000 (12:43 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 29 Sep 2019 10:43:19 +0000 (12:43 +0200)
modules/postgres/manifests/backup_cluster.pp
modules/postgres/manifests/cluster/hba_entry.pp

index 7741d94..cceb94e 100644 (file)
@@ -73,7 +73,7 @@ define postgres::backup_cluster(
     target      => 'pg-backup',
   }
 
-  postgres::cluster::hba_entry { 'backup-replication':
+  postgres::cluster::hba_entry { "backup-replication::${pg_version}::${pg_cluster}":
     pg_version => $pg_version,
     pg_cluster => $pg_cluster,
     pg_port    => $pg_port,
index e909a3c..a7a2f15 100644 (file)
@@ -38,7 +38,7 @@ define postgres::cluster::hba_entry (
   }
 
   if ($address) {
-    ferm::rule::simple { "postgres::cluster::hba_entry::${pg_version}::${pg_cluster}::${name}":
+    ferm::rule::simple { "postgres::cluster::hba_entry::${name}":
       description => "allow access to pg${pg_version}/${pg_cluster}: ${name}",
       saddr       => $address,
       chain       => "pg-${pg_port}",
@@ -58,7 +58,7 @@ define postgres::cluster::hba_entry (
     }
   }
 
-  @concat::fragment { "postgres::cluster::pg_hba::${pg_version}::${pg_cluster}::${name}":
+  @concat::fragment { "postgres::cluster::pg_hba::${name}":
     tag     => "postgres::cluster::${pg_version}::${pg_cluster}::hba",
     target  => "postgres::cluster::${pg_version}::${pg_cluster}::hba",
     order   => $order,