manage bmdb1/main pg_hba
[mirror/dsa-puppet.git] / modules / roles / manifests / buildd_master.pp
index 3d4d449..6c6f4be 100644 (file)
@@ -2,7 +2,11 @@
 #
 # @param db_address     hostname of the postgres server for this service
 # @param db_port        port of the postgres server for this service
+# @param qa_buildlogchecks_db_address     hostname of the postgres server for this service
+# @param qa_buildlogchecks_db_port        port of the postgres server for this service
 class roles::buildd_master (
+  String  $qa_buildlogchecks_db_address,
+  Integer $qa_buildlogchecks_db_port,
   String  $db_address = $roles::buildd_master::params::db_address,
   Integer $db_port    = $roles::buildd_master::params::db_port,
 ) inherits roles::buildd_master::params {
@@ -37,4 +41,12 @@ class roles::buildd_master (
   }
 
   include roles::udd::db_guest_access
+
+  @@postgres::cluster::hba_entry { "qa-buildlogchecks-${::fqdn}":
+    tag      => "postgres::cluster::${qa_buildlogchecks_db_port}::hba::${qa_buildlogchecks_db_address}",
+    pg_port  => $qa_buildlogchecks_db_port,
+    database => 'qa-buildlogchecks',
+    user     => 'qa-buildlogchecks',
+    address  => $base::public_addresses,
+  }
 }