www_master -> hiera role; explicitly include apache2
[mirror/dsa-puppet.git] / modules / roles / manifests / init.pp
1 # = Class: roles
2 #
3 # Lookup role and include relevant classes for roles
4 #
5 # == Sample Usage:
6 #
7 #   include roles
8 #
9 class roles {
10         if has_role('muninmaster') {
11                 include munin::master
12         }
13
14         if has_role('nagiosmaster') {
15                 include nagios::server
16         }
17
18         # archive.debian.org
19         if has_role('historical_mirror') {
20                 include roles::historical_mirror
21         }
22
23         # debug archive
24         if has_role('debug_mirror') {
25                 include roles::debug_mirror
26         }
27
28         # ftp.debian.org and its ecosystem
29         if has_role('debian_mirror') {
30                 include roles::debian_mirror
31         }
32         if has_role('ftp_master') {
33                 include roles::ftp_master
34                 include roles::dakmaster
35                 include roles::signing
36         }
37         if has_role('security_upload') {
38                 include roles::security_upload
39         }
40         #
41         # security.debian.org
42         if has_role('security_master') {
43                 include roles::security_master
44                 include roles::dakmaster
45         }
46
47         if has_role('security_mirror') {
48                 include roles::security_mirror
49         }
50
51         if has_role('git_master') {
52                 include roles::git_master
53         }
54
55         if has_role('wiki') {
56                 include roles::wiki
57         }
58
59         if has_role('syncproxy') {
60                 include roles::syncproxy
61         }
62
63         if has_role('mailrelay') {
64                 include roles::mailrelay
65         }
66
67         if has_role('dns_primary') {
68                 include roles::dns_primary
69         }
70
71         if has_role('dns_geo') {
72                 include roles::dns_geodns
73         }
74
75         if has_role('security_tracker') {
76                 include roles::security_tracker
77         }
78
79         if has_role('rtmaster') {
80                 include roles::rtmaster
81         }
82
83         if has_role('udd') {
84                 include roles::udd
85         }
86
87         if has_role('sso') {
88                 include roles::sso
89         }
90
91         if has_role('sso_rp') {
92                 include roles::sso_rp
93         }
94
95         if has_role('postgres_backup_server') {
96                 include postgres::backup_server
97         }
98
99         if has_role('packages') {
100                 ssl::service { 'packages.debian.org': notify  => Exec['service apache2 reload'], key => true, }
101         }
102
103         if has_role('historicalpackages') {
104                 ssl::service { 'historical.packages.debian.org': notify  => Exec['service apache2 reload'], key => true, }
105         }
106
107         if has_role('qamaster') {
108                 ssl::service { 'qa.debian.org': notify  => Exec['service apache2 reload'], key => true, }
109         }
110
111         if has_role('packagesqamaster') {
112                 ssl::service { 'packages.qa.debian.org': notify  => Exec['service apache2 reload'], key => true, }
113         }
114
115         if $::hostname in [lw01, lw02, lw03, lw04, lw09, lw10] {
116                 include roles::snapshot
117         }
118
119         if has_role('snapshot_web') {
120                 include roles::snapshot_web
121         }
122
123         if has_role('snapshot_shell') {
124                 include roles::snapshot_shell
125         }
126
127         if has_role('planet_master') {
128                 include roles::planet_master
129         }
130         if has_role('planet_search') {
131                 ssl::service { 'planet-search.debian.org': notify  => Exec['service apache2 reload'], key => true, }
132         }
133
134         if has_role('i18n.d.o') {
135                 ssl::service { 'i18n.debian.org': notify  => Exec['service apache2 reload'], key => true, }
136         }
137
138         if has_role('l10n.d.o') {
139                 ssl::service { 'l10n.debian.org': notify  => Exec['service apache2 reload'], key => true, }
140         }
141
142         if has_role('ports_master') {
143                 include roles::ports_master
144         }
145
146         if has_role('onionbalance') {
147                 include onion::balance
148         }
149         if has_role('bgp') {
150                 include roles::bgp
151         }
152
153         if has_role('postgresql_server') {
154                 include postgres::backup_source
155         }
156
157         if $::keyring_debian_org_mirror {
158                 include roles::keyring_debian_org_mirror
159         }
160
161         if has_role('popcon') {
162                 include roles::popcon
163         }
164 }