nm.d.o no longer needs access to projectb on bmdb1
[mirror/dsa-puppet.git] / modules / roles / manifests / nm.pp
index cceb28d..131714e 100644 (file)
@@ -1,4 +1,11 @@
-class roles::nm {
+# nm.debian.org role
+#
+# @param db_address     hostname of the postgres server for this service
+# @param db_port        port of the postgres server for this service
+class roles::nm (
+  String  $db_address,
+  Integer $db_port,
+) {
   include apache2
   include roles::sso_rp
 
@@ -11,4 +18,14 @@ class roles::nm {
     owner => 'nm',
     group => 'nm',
   }
+
+  @@postgres::cluster::hba_entry { "nm-${::fqdn}":
+    tag      => "postgres::cluster::${db_port}::hba::${db_address}",
+    pg_port  => $db_port,
+    database => ['nm', 'contributors'],
+    user     => ['nm', 'nmweb'],
+    address  => $base::public_addresses,
+  }
+
+  include roles::postgresql::ftp_master_dak_replica::db_guest_access::ubc
 }