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