include archive_master role too
[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
11         if has_role('puppetmaster') {
12                 include puppetmaster
13         }
14
15         if has_role('muninmaster') {
16                 include munin::master
17         }
18
19         if has_role('nagiosmaster') {
20         #       include nagios::server
21                 ssl::service { 'nagios.debian.org':
22                         notify => Service['apache2'],
23                 }
24         }
25
26         # XXX: turn this into a real role
27         if getfromhash($site::nodeinfo, 'buildd') {
28                 include buildd
29         }
30
31         # XXX: turn this into a real role
32         if getfromhash($site::nodeinfo, 'porterbox') {
33                 include porterbox
34         }
35
36         if has_role('archive_master') {
37                 include archive_master
38         }
39
40         if has_role('bugs_mirror') {
41                 include roles::bugs_mirror
42         }
43
44         if has_role('bugs_base') {
45                 ssl::service { 'bugs.debian.org':
46                         notify => Service['apache2'],
47                 }
48         }
49         if has_role('bugs_master') {
50                 ssl::service { 'bugs-master.debian.org':
51                         notify => Service['apache2'],
52                         key => true,
53                 }
54         }
55
56         if has_role('ftp_master') {
57                 include roles::ftp_master
58                 include roles::dakmaster
59         }
60
61         if has_role('api.ftp-master') {
62                 ssl::service { 'api.ftp-master.debian.org':
63                         notify => Service['apache2'],
64                 }
65         }
66
67         # XXX: turn this into a real role
68         if getfromhash($site::nodeinfo, 'apache2_security_mirror') {
69                 include roles::security_mirror
70         }
71
72         # XXX: turn this into a real role
73         if getfromhash($site::nodeinfo, 'apache2_www_mirror') {
74                 include roles::www_mirror
75         }
76
77         if has_role('mirror_debug') {
78                 include roles::debug_mirror
79         }
80
81         if has_role('ftp.d.o') {
82                 include roles::ftp
83         }
84
85         if has_role('ftp.upload.d.o') {
86                 include roles::ftp_upload
87         }
88
89         if has_role('ssh.upload.d.o') {
90                 include roles::ssh_upload
91         }
92
93         if has_role('git_master') {
94                 include roles::git_master
95         }
96
97         if has_role('people') {
98                 ssl::service { 'people.debian.org':
99                         notify => Service['apache2'],
100                 }
101         }
102
103         if has_role('security_master') {
104                 include roles::security_master
105                 include roles::dakmaster
106         }
107
108         if has_role('www_master') {
109                 include roles::www_master
110         }
111
112         if has_role('cgi.d.o') {
113                 ssl::service { 'cgi.debian.org':
114                         notify => Service['apache2'],
115                         key => true,
116                 }
117         }
118
119         if has_role('keyring') {
120                 include roles::keyring
121         }
122
123         if has_role('wiki') {
124                 include roles::wiki
125         }
126
127         if has_role('syncproxy') {
128                 include roles::syncproxy
129         }
130
131         if has_role('static_master') {
132                 include roles::static_master
133         }
134
135         if has_role('static_mirror') {
136                 include roles::static_mirror
137         } elsif has_role('static_source') {
138                 include roles::static_source
139         }
140
141         if has_role('weblog_provider') {
142                 include roles::weblog_provider
143         }
144
145         if has_role('mailrelay') {
146                 include roles::mailrelay
147         }
148
149         if has_role('pubsub') {
150                 include roles::pubsub
151         }
152
153         if has_role('dbmaster') {
154                 include roles::dbmaster
155         }
156
157         if has_role('dns_primary') {
158                 include named::primary
159         }
160
161         if has_role('weblog_destination') {
162                 include roles::weblog_destination
163         }
164
165         if has_role('vote') {
166                 include roles::vote
167         }
168
169         if has_role('security_tracker') {
170                 include roles::security_tracker
171         }
172
173         if has_role('lists') {
174                 include roles::lists
175         }
176
177         if has_role('list_search') {
178                 include roles::listsearch
179         }
180
181         if has_role('rtmaster') {
182                 include roles::rtmaster
183         }
184
185         if has_role('udd') {
186                 include roles::udd
187         }
188
189         if has_role('sso') {
190                 include roles::sso
191         }
192
193         if has_role('sso_rp') {
194                 include roles::sso_rp
195         }
196
197         if has_role('tracker') {
198                 include roles::tracker
199         }
200
201         if has_role('buildd_master') {
202                 include roles::buildd_master
203         }
204
205         if has_role('piuparts') {
206                 include roles::piuparts
207         }
208
209         if has_role('contributors') {
210                 include roles::contributors
211         }
212
213         if has_role('nm') {
214                 include roles::nm
215         }
216
217         if has_role('release') {
218                 include roles::release
219         }
220
221         if has_role('rtc') {
222                 include roles::rtc
223         }
224
225         if has_role('jenkins') {
226                 include roles::jenkins
227         }
228
229         if has_role('keystone') {
230                 include roles::keystone
231         }
232         if has_role('keystone_rabbitmq') {
233                 include roles::keystone::rabbitmq
234         }
235
236         if has_role('memcached') {
237                 include roles::memcached
238         }
239
240         if has_role('postgres_backup_server') {
241                 include postgres::backup_server
242         }
243
244         if has_role('packages') {
245                 ssl::service { 'packages.debian.org':
246                         notify => Service['apache2'],
247                 }
248         }
249
250         if has_role('qamaster') {
251                 ssl::service { 'qa.debian.org':
252                         notify => Service['apache2'],
253                 }
254         }
255
256         if has_role('packagesqamaster') {
257                 ssl::service { 'packages.qa.debian.org':
258                         notify => Service['apache2'],
259                 }
260         }
261
262         if has_role('gobby_debian_org') {
263                 ssl::service { 'gobby.debian.org':
264                         notify => Service['apache2'],
265                 }
266         }
267
268         if has_role('search_backend') {
269                 include search_backend
270         }
271         if has_role('search_frontend') {
272                 include search_frontend
273         }
274
275         if has_role('dgit_browse') {
276                 include dgit_browse
277         }
278         if has_role('dgit_git') {
279                 include dgit_git
280         }
281
282         if $::hostname in [lw01, lw02, lw03, lw04] {
283                 include snapshot
284         }
285
286         if has_role('veyepar.debian.org') {
287                 ssl::service { 'veyepar.debian.org':
288                         notify => Service['apache2'],
289                 }
290         }
291
292         if has_role('httpredir') {
293                 include roles::httpredir
294         }
295
296         if has_role('debtags') {
297                 include roles::debtags
298         }
299
300         if has_role('planet_search') {
301                 ssl::service { 'planet-search.debian.org':
302                         notify => Service['apache2'],
303                         key => true,
304                 }
305         }
306
307         if has_role('i18n.d.o') {
308                 ssl::service { 'i18n.debian.org':
309                         notify => Service['apache2'],
310                         key => true,
311                 }
312         }
313
314         if has_role('l10n.d.o') {
315                 ssl::service { 'l10n.debian.org':
316                         notify => Service['apache2'],
317                         key => true,
318                 }
319         }
320
321         if has_role('dedup.d.n') {
322                 ssl::service { 'dedup.debian.net':
323                         notify => Service['apache2'],
324                         key => true,
325                 }
326         }
327
328         if has_role('pet.d.n') {
329                 ssl::service { 'pet.debian.net':
330                         notify => Service['apache2'],
331                         key => true,
332                 }
333                 ssl::service { 'pet-devel.debian.net':
334                         notify => Service['apache2'],
335                         key => true,
336                 }
337         }
338 }