X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fqamaster.pp;h=e0c89715366f2fa760799e419affef73e59cffdb;hb=a77153dac35e1cff12334d56a4c9fcd53586e58f;hp=66ba8381b1f031ac10821dff40f850ca25c9192a;hpb=d139960127670b8dd064c3c623de331dfc11cfb4;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/qamaster.pp b/modules/roles/manifests/qamaster.pp index 66ba8381b..e0c897153 100644 --- a/modules/roles/manifests/qamaster.pp +++ b/modules/roles/manifests/qamaster.pp @@ -1,4 +1,15 @@ -class roles::qamaster { +# qa.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 +# @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::qamaster ( + String $db_address, + Integer $db_port, + String $qa_buildlogchecks_db_address = lookup('roles::buildd_master::qa_buildlogchecks_db_address'), + Integer $qa_buildlogchecks_db_port = lookup('roles::buildd_master::qa_buildlogchecks_db_port'), +) { include apache2 include roles::sso_rp @@ -10,4 +21,28 @@ class roles::qamaster { } include roles::udd::db_guest_access + + @@postgres::cluster::hba_entry { "qa-${::fqdn}": + tag => "postgres::cluster::${db_port}::hba::${db_address}", + pg_port => $db_port, + database => 'qa', + user => ['qa', 'qaweb'], + address => $base::public_addresses, + } + @@postgres::cluster::hba_entry { "qa-guest-${::fqdn}": + tag => "postgres::cluster::${db_port}::hba::${db_address}", + pg_port => $db_port, + database => 'qa', + user => 'guest', + address => $base::public_addresses, + method => 'trust', + } + @@postgres::cluster::hba_entry { "qa-buildlogchecks-guest-${::fqdn}": + tag => "postgres::cluster::${qa_buildlogchecks_db_port}::hba::${qa_buildlogchecks_db_address}", + pg_port => $qa_buildlogchecks_db_port, + database => 'qa-buildlogchecks', + user => 'guest', + address => $base::public_addresses, + method => 'trust', + } }