X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fnm.pp;h=131714e8d5fc4b38bab4045d3e6f127d27644420;hb=b3766327be68cc9aad0da7aa0c7bf42668f23590;hp=cceb28d1740fed66ef77f2fb21977e38d901fdf3;hpb=3324b4ae702172197fe7ad725a36f052f1e67c71;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/nm.pp b/modules/roles/manifests/nm.pp index cceb28d17..131714e8d 100644 --- a/modules/roles/manifests/nm.pp +++ b/modules/roles/manifests/nm.pp @@ -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 }