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