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