]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/roles/manifests/init.pp
roles: make use of porterbox uninstall features
[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                 class {'porterbox':
35                         ensure => present,
36                 }
37         } else {
38                 include porterbox
39                 class {'porterbox':
40                         ensure => absent,
41                 }
42         }
43
44         if has_role('bugs_mirror') {
45                 include roles::bugs_mirror
46         }
47
48         if has_role('bugs_base') {
49                 ssl::service { 'bugs.debian.org':
50                         notify => Service['apache2'],
51                 }
52         }
53         if has_role('bugs_master') {
54                 ssl::service { 'bugs-master.debian.org':
55                         notify => Service['apache2'],
56                 }
57         }
58
59         if has_role('ftp_master') {
60                 include roles::ftp_master
61                 include roles::dakmaster
62         }
63
64         # XXX: turn this into a real role
65         if getfromhash($site::nodeinfo, 'apache2_security_mirror') {
66                 include roles::security_mirror
67         }
68
69         # XXX: turn this into a real role
70         if getfromhash($site::nodeinfo, 'apache2_www_mirror') {
71                 include roles::www_mirror
72         }
73
74         if has_role('ftp.d.o') {
75                 include roles::ftp
76         }
77
78         if has_role('ftp.upload.d.o') {
79                 include roles::ftp_upload
80         }
81
82         if has_role('git_master') {
83                 include roles::git_master
84         }
85
86         if has_role('people') {
87                 ssl::service { 'people.debian.org':
88                         notify => Service['apache2'],
89                 }
90         }
91
92         if has_role('security_master') {
93                 include roles::security_master
94                 include roles::dakmaster
95         }
96
97         if has_role('www_master') {
98                 include roles::www_master
99         }
100
101         if has_role('keyring') {
102                 include roles::keyring
103         }
104
105         if has_role('wiki') {
106                 include roles::wiki
107         }
108
109         if has_role('syncproxy') {
110                 include roles::syncproxy
111         }
112
113         if has_role('static_master') {
114                 include roles::static_master
115         }
116
117         if has_role('static_mirror') {
118                 include roles::static_mirror
119         } elsif has_role('static_source') {
120                 include roles::static_source
121         }
122
123         if has_role('weblog_provider') {
124                 include roles::weblog_provider
125         }
126
127         if has_role('mailrelay') {
128                 include roles::mailrelay
129         }
130
131         if has_role('pubsub') {
132                 include roles::pubsub
133         }
134
135         if has_role('dbmaster') {
136                 include roles::dbmaster
137         }
138
139         if has_role('dns_primary') {
140                 include named::primary
141         }
142
143         if has_role('weblog_destination') {
144                 include roles::weblog_destination
145         }
146
147         if has_role('vote') {
148                 include roles::vote
149         }
150
151         if has_role('security_tracker') {
152                 include roles::security_tracker
153         }
154
155         if has_role('lists') {
156                 include roles::lists
157         }
158
159         if has_role('rtmaster') {
160                 include roles::rtmaster
161         }
162
163         if has_role('udd') {
164                 include roles::udd
165         }
166
167         if has_role('sso') {
168                 include roles::sso
169         }
170
171         if has_role('tracker') {
172                 include roles::tracker
173         }
174
175         if has_role('buildd_master') {
176                 include roles::buildd_master
177         }
178
179         if has_role('buildd_ports_master') {
180                 include roles::buildd_ports_master
181         }
182
183         if has_role('piuparts') {
184                 include roles::piuparts
185         }
186
187         if has_role('contributors') {
188                 include roles::contributors
189         }
190
191         if has_role('nm') {
192                 include roles::nm
193         }
194
195         if has_role('release') {
196                 include roles::release
197         }
198
199         if has_role('rtc') {
200                 include roles::rtc
201         }
202
203         if has_role('keystone') {
204                 include roles::keystone
205         }
206
207         if has_role('postgres_backup_server') {
208                 include postgres::backup_server
209         }
210
211         if has_role('packages') {
212                 ssl::service { 'packages.debian.org':
213                         notify => Service['apache2'],
214                 }
215         }
216
217         if has_role('qamaster') {
218                 ssl::service { 'qa.debian.org':
219                         notify => Service['apache2'],
220                 }
221         }
222
223         if has_role('packagesqamaster') {
224                 ssl::service { 'packages.qa.debian.org':
225                         notify => Service['apache2'],
226                 }
227         }
228
229         if has_role('gobby_debian_org') {
230                 ssl::service { 'gobby.debian.org':
231                         tlsaport => 0,
232                 }
233         }
234 }