Switch appstream, qa, *.dgit to letsencrypt
[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         if has_role('manpages') {
68                 ssl::service { 'manpages.debian.org':
69                         notify => Service['apache2'],
70                         key => true,
71                 }
72         }
73
74         # XXX: turn this into a real role
75         if getfromhash($site::nodeinfo, 'apache2_security_mirror') {
76                 include roles::security_mirror
77         }
78
79         if has_role('mirror_debug') {
80                 include roles::debug_mirror
81         }
82         if has_role('mirror_ports') {
83                 include roles::ports_mirror
84         }
85
86         if has_role('ftp.d.o') {
87                 include roles::ftp
88         }
89
90         if has_role('ftp.upload.d.o') {
91                 include roles::ftp_upload
92         }
93
94         if has_role('ssh.upload.d.o') {
95                 include roles::ssh_upload
96         }
97
98         if has_role('git_master') {
99                 include roles::git_master
100         }
101
102         if has_role('people') {
103                 ssl::service { 'people.debian.org':
104                         notify => Service['apache2'],
105                 }
106         }
107
108         if has_role('security_master') {
109                 include roles::security_master
110                 include roles::dakmaster
111         }
112
113         if has_role('www_master') {
114                 include roles::www_master
115         }
116
117         if has_role('cgi.d.o') {
118                 ssl::service { 'cgi.debian.org':
119                         notify => Service['apache2'],
120                         key => true,
121                 }
122         }
123
124         if has_role('keyring') {
125                 include roles::keyring
126         }
127
128         if has_role('wiki') {
129                 include roles::wiki
130         }
131
132         if has_role('syncproxy') {
133                 include roles::syncproxy
134         }
135
136         if has_role('static_master') {
137                 include roles::static_master
138         }
139
140         if has_role('static_mirror') {
141                 include roles::static_mirror
142         } elsif has_role('static_source') {
143                 include roles::static_source
144         }
145
146         if has_role('weblog_provider') {
147                 include roles::weblog_provider
148         }
149
150         if has_role('mailrelay') {
151                 include roles::mailrelay
152         }
153
154         if has_role('pubsub') {
155                 include roles::pubsub
156         }
157
158         if has_role('dbmaster') {
159                 include roles::dbmaster
160         }
161
162         if has_role('dns_primary') {
163                 include named::primary
164         }
165
166         if has_role('weblog_destination') {
167                 include roles::weblog_destination
168         }
169
170         if has_role('vote') {
171                 include roles::vote
172         }
173
174         if has_role('security_tracker') {
175                 include roles::security_tracker
176         }
177
178         if has_role('lists') {
179                 include roles::lists
180         }
181
182         if has_role('list_search') {
183                 include roles::listsearch
184         }
185
186         if has_role('rtmaster') {
187                 include roles::rtmaster
188         }
189
190         if has_role('udd') {
191                 include roles::udd
192         }
193
194         if has_role('sso') {
195                 include roles::sso
196         }
197
198         if has_role('sso_rp') {
199                 include roles::sso_rp
200         }
201
202         if has_role('tracker') {
203                 include roles::tracker
204         }
205
206         if has_role('buildd_master') {
207                 include roles::buildd_master
208         }
209
210         if has_role('piuparts') {
211                 include roles::piuparts
212         }
213
214         if has_role('contributors') {
215                 include roles::contributors
216         }
217
218         if has_role('nm') {
219                 include roles::nm
220         }
221
222         if has_role('release') {
223                 include roles::release
224         }
225
226         if has_role('rtc') {
227                 include roles::rtc
228         }
229
230         if has_role('jenkins') {
231                 include roles::jenkins
232         }
233
234         if has_role('keystone') {
235                 include roles::keystone
236         }
237         if has_role('keystone_rabbitmq') {
238                 include roles::keystone::rabbitmq
239         }
240
241         if has_role('memcached') {
242                 include roles::memcached
243         }
244
245         if has_role('postgres_backup_server') {
246                 include postgres::backup_server
247         }
248
249         if has_role('packages') {
250                 ssl::service { 'packages.debian.org':
251                         notify => Service['apache2'],
252                         key => true,
253                 }
254         }
255
256         if has_role('qamaster') {
257                 ssl::service { 'qa.debian.org':
258                         notify => Service['apache2'],
259                         key => true,
260                 }
261         }
262
263         if has_role('packagesqamaster') {
264                 ssl::service { 'packages.qa.debian.org':
265                         notify => Service['apache2'],
266                         key => true,
267                 }
268         }
269
270         if has_role('gobby_debian_org') {
271                 ssl::service { 'gobby.debian.org':
272                         notify => Service['apache2'],
273                         key => true,
274                         tlsaport => [443, 6523],
275                 }
276         }
277
278         if has_role('search_backend') {
279                 include search_backend
280         }
281         if has_role('search_frontend') {
282                 include search_frontend
283         }
284
285         if has_role('dgit_browse') {
286                 include dgit_browse
287         }
288         if has_role('dgit_git') {
289                 include dgit_git
290         }
291
292         if $::hostname in [lw01, lw02, lw03, lw04] {
293                 include snapshot
294         }
295
296         if has_role('veyepar.debian.org') {
297                 ssl::service { 'veyepar.debian.org':
298                         notify => Service['apache2'],
299                 }
300         }
301
302         if has_role('httpredir') {
303                 include roles::httpredir
304         }
305
306         if has_role('debtags') {
307                 include roles::debtags
308         }
309
310         if has_role('planet_search') {
311                 ssl::service { 'planet-search.debian.org':
312                         notify => Service['apache2'],
313                         key => true,
314                 }
315         }
316
317         if has_role('i18n.d.o') {
318                 ssl::service { 'i18n.debian.org':
319                         notify => Service['apache2'],
320                         key => true,
321                 }
322         }
323
324         if has_role('l10n.d.o') {
325                 ssl::service { 'l10n.debian.org':
326                         notify => Service['apache2'],
327                         key => true,
328                 }
329         }
330
331         if has_role('dedup.d.n') {
332                 ssl::service { 'dedup.debian.net':
333                         notify => Service['apache2'],
334                         key => true,
335                 }
336         }
337
338         if has_role('pet.d.n') {
339                 ssl::service { 'pet.debian.net':
340                         notify => Service['apache2'],
341                         key => true,
342                 }
343                 ssl::service { 'pet-devel.debian.net':
344                         notify => Service['apache2'],
345                         key => true,
346                 }
347         }
348
349         if has_role('ports-master') {
350                 include roles::ports-master
351         }
352 }