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