Give wuiet.d.o access to the ubc projectb replica
[mirror/dsa-puppet.git] / modules / roles / manifests / buildd_master.pp
index fd5154c..2833821 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 {
@@ -35,4 +39,18 @@ class roles::buildd_master (
     user     => 'all',
     address  => $base::public_addresses,
   }
+
+  # The UDD database is used to display FTBFS bugs on the web interface
+  include roles::udd::db_guest_access
+
+  include roles::postgresql::ftp_master_dak_replica::db_guest_access::bm
+  include roles::postgresql::ftp_master_dak_replica::db_guest_access::ubc
+
+  @@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,
+  }
 }