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