e0c89715366f2fa760799e419affef73e59cffdb
[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
25   @@postgres::cluster::hba_entry { "qa-${::fqdn}":
26     tag      => "postgres::cluster::${db_port}::hba::${db_address}",
27     pg_port  => $db_port,
28     database => 'qa',
29     user     => ['qa', 'qaweb'],
30     address  => $base::public_addresses,
31   }
32   @@postgres::cluster::hba_entry { "qa-guest-${::fqdn}":
33     tag      => "postgres::cluster::${db_port}::hba::${db_address}",
34     pg_port  => $db_port,
35     database => 'qa',
36     user     => 'guest',
37     address  => $base::public_addresses,
38     method   => 'trust',
39   }
40   @@postgres::cluster::hba_entry { "qa-buildlogchecks-guest-${::fqdn}":
41     tag      => "postgres::cluster::${qa_buildlogchecks_db_port}::hba::${qa_buildlogchecks_db_address}",
42     pg_port  => $qa_buildlogchecks_db_port,
43     database => 'qa-buildlogchecks',
44     user     => 'guest',
45     address  => $base::public_addresses,
46     method   => 'trust',
47   }
48 }