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