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