Get rid of buildd-{lenny,squeeze,wheezy} shares on security-master rsync
[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('bugs_mirror') {
37                 include roles::bugs_mirror
38         }
39
40         if has_role('bugs_base') {
41                 ssl::service { 'bugs.debian.org':
42                         notify => Service['apache2'],
43                 }
44         }
45         if has_role('bugs_master') {
46                 ssl::service { 'bugs-master.debian.org':
47                         notify => Service['apache2'],
48                 }
49         }
50
51         if has_role('ftp_master') {
52                 include roles::ftp_master
53                 include roles::dakmaster
54         }
55
56         if has_role('api.ftp-master') {
57                 ssl::service { 'api.ftp-master.debian.org':
58                         notify => Service['apache2'],
59                 }
60         }
61
62         # XXX: turn this into a real role
63         if getfromhash($site::nodeinfo, 'apache2_security_mirror') {
64                 include roles::security_mirror
65         }
66
67         # XXX: turn this into a real role
68         if getfromhash($site::nodeinfo, 'apache2_www_mirror') {
69                 include roles::www_mirror
70         }
71
72         if has_role('mirror_debug') {
73                 include roles::debug_mirror
74         }
75
76         if has_role('ftp.d.o') {
77                 include roles::ftp
78         }
79
80         if has_role('ftp.upload.d.o') {
81                 include roles::ftp_upload
82         }
83
84         if has_role('ssh.upload.d.o') {
85                 include roles::ssh_upload
86         }
87
88         if has_role('git_master') {
89                 include roles::git_master
90         }
91
92         if has_role('people') {
93                 ssl::service { 'people.debian.org':
94                         notify => Service['apache2'],
95                 }
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('keyring') {
108                 include roles::keyring
109         }
110
111         if has_role('wiki') {
112                 include roles::wiki
113         }
114
115         if has_role('syncproxy') {
116                 include roles::syncproxy
117         }
118
119         if has_role('static_master') {
120                 include roles::static_master
121         }
122
123         if has_role('static_mirror') {
124                 include roles::static_mirror
125         } elsif has_role('static_source') {
126                 include roles::static_source
127         }
128
129         if has_role('weblog_provider') {
130                 include roles::weblog_provider
131         }
132
133         if has_role('mailrelay') {
134                 include roles::mailrelay
135         }
136
137         if has_role('pubsub') {
138                 include roles::pubsub
139         }
140
141         if has_role('dbmaster') {
142                 include roles::dbmaster
143         }
144
145         if has_role('dns_primary') {
146                 include named::primary
147         }
148
149         if has_role('weblog_destination') {
150                 include roles::weblog_destination
151         }
152
153         if has_role('vote') {
154                 include roles::vote
155         }
156
157         if has_role('security_tracker') {
158                 include roles::security_tracker
159         }
160
161         if has_role('lists') {
162                 include roles::lists
163         }
164
165         if has_role('list_search') {
166                 include roles::listsearch
167         }
168
169         if has_role('rtmaster') {
170                 include roles::rtmaster
171         }
172
173         if has_role('udd') {
174                 include roles::udd
175         }
176
177         if has_role('sso') {
178                 include roles::sso
179         }
180
181         if has_role('sso_rp') {
182                 include roles::sso_rp
183         }
184
185         if has_role('tracker') {
186                 include roles::tracker
187         }
188
189         if has_role('buildd_master') {
190                 include roles::buildd_master
191         }
192
193         if has_role('buildd_ports_master') {
194                 include roles::buildd_ports_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('release') {
210                 include roles::release
211         }
212
213         if has_role('rtc') {
214                 include roles::rtc
215         }
216
217         if has_role('jenkins') {
218                 include roles::jenkins
219         }
220
221         if has_role('keystone') {
222                 include roles::keystone
223         }
224         if has_role('keystone_rabbitmq') {
225                 include roles::keystone::rabbitmq
226         }
227
228         if has_role('memcached') {
229                 include roles::memcached
230         }
231
232         if has_role('postgres_backup_server') {
233                 include postgres::backup_server
234         }
235
236         if has_role('packages') {
237                 ssl::service { 'packages.debian.org':
238                         notify => Service['apache2'],
239                 }
240         }
241
242         if has_role('qamaster') {
243                 ssl::service { 'qa.debian.org':
244                         notify => Service['apache2'],
245                 }
246         }
247
248         if has_role('packagesqamaster') {
249                 ssl::service { 'packages.qa.debian.org':
250                         notify => Service['apache2'],
251                 }
252         }
253
254         if has_role('gobby_debian_org') {
255                 ssl::service { 'gobby.debian.org':
256                         notify => Service['apache2'],
257                 }
258         }
259
260         if has_role('search_backend') {
261                 include search_backend
262         }
263         if has_role('search_frontend') {
264                 include search_frontend
265         }
266
267         if has_role('dgit_browse') {
268                 include dgit_browse
269         }
270         if has_role('dgit_git') {
271                 include dgit_git
272         }
273
274         if $::hostname in [lw01, lw02, lw03, lw04] {
275                 include snapshot
276         }
277
278         if has_role('veyepar.debian.org') {
279                 ssl::service { 'veyepar.debian.org':
280                         notify => Service['apache2'],
281                 }
282         }
283 }