manage bmdb1/dak pg_hba
[mirror/dsa-puppet.git] / modules / roles / manifests / qamaster.pp
1 # qa.debian.org role
2 #
3 # @param db_address     hostname of the postgres server for this service
4 # @param db_port        port of the postgres server for this service
5 # @param qa_buildlogchecks_db_address     hostname of the postgres server for this service
6 # @param qa_buildlogchecks_db_port        port of the postgres server for this service
7 class roles::qamaster (
8   String  $db_address,
9   Integer $db_port,
10   String  $qa_buildlogchecks_db_address = lookup('roles::buildd_master::qa_buildlogchecks_db_address'),
11   Integer $qa_buildlogchecks_db_port    = lookup('roles::buildd_master::qa_buildlogchecks_db_port'),
12 ) {
13   include apache2
14   include roles::sso_rp
15
16   ssl::service { 'qa.debian.org': notify  => Exec['service apache2 reload'], key => true, }
17
18   exim::vdomain { 'qa.debian.org':
19     owner => 'qa',
20     group => 'qa',
21   }
22
23   include roles::udd::db_guest_access
24   include roles::postgresql::ftp_master_dak_replica::db_guest_access::bm
25
26   @@postgres::cluster::hba_entry { "qa-${::fqdn}":
27     tag      => "postgres::cluster::${db_port}::hba::${db_address}",
28     pg_port  => $db_port,
29     database => 'qa',
30     user     => ['qa', 'qaweb'],
31     address  => $base::public_addresses,
32   }
33   @@postgres::cluster::hba_entry { "qa-guest-${::fqdn}":
34     tag      => "postgres::cluster::${db_port}::hba::${db_address}",
35     pg_port  => $db_port,
36     database => 'qa',
37     user     => 'guest',
38     address  => $base::public_addresses,
39     method   => 'trust',
40   }
41   @@postgres::cluster::hba_entry { "qa-buildlogchecks-guest-${::fqdn}":
42     tag      => "postgres::cluster::${qa_buildlogchecks_db_port}::hba::${qa_buildlogchecks_db_address}",
43     pg_port  => $qa_buildlogchecks_db_port,
44     database => 'qa-buildlogchecks',
45     user     => 'guest',
46     address  => $base::public_addresses,
47     method   => 'trust',
48   }
49 }