]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/roles/manifests/init.pp
037e74888971a54af0afe085ff8ffddae4bb6367
[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         # XXX: turn this into a real role
57         if getfromhash($site::nodeinfo, 'apache2_security_mirror') {
58                 include roles::security_mirror
59         }
60
61         # XXX: turn this into a real role
62         if getfromhash($site::nodeinfo, 'apache2_www_mirror') {
63                 include roles::www_mirror
64         }
65
66         if has_role('ftp.d.o') {
67                 include roles::ftp
68         }
69
70         if has_role('ftp.upload.d.o') {
71                 include roles::ftp_upload
72         }
73
74         if has_role('git_master') {
75                 include roles::git_master
76         }
77
78         if has_role('security_master') {
79                 include roles::security_master
80                 include roles::dakmaster
81         }
82
83         if has_role('www_master') {
84                 include roles::www_master
85         }
86
87         if has_role('keyring') {
88                 include roles::keyring
89         }
90
91         if has_role('wiki') {
92                 include roles::wiki
93         }
94
95         if has_role('syncproxy') {
96                 include roles::syncproxy
97         }
98
99         if has_role('static_master') {
100                 include roles::static_master
101         }
102
103         if has_role('static_mirror') {
104                 include roles::static_mirror
105         } elsif has_role('static_source') {
106                 include roles::static_source
107         }
108
109         if has_role('weblog_provider') {
110                 include roles::weblog_provider
111         }
112
113         if has_role('mailrelay') {
114                 include roles::mailrelay
115         }
116
117         if has_role('pubsub') {
118                 include roles::pubsub
119         }
120
121         if has_role('dbmaster') {
122                 include roles::dbmaster
123         }
124
125         if has_role('dns_primary') {
126                 include named::primary
127         }
128
129         if has_role('weblog_destination') {
130                 include roles::weblog_destination
131         }
132
133         if has_role('vote') {
134                 include roles::vote
135         }
136
137         if has_role('security_tracker') {
138                 include roles::security_tracker
139         }
140
141         if has_role('lists') {
142                 include roles::lists
143         }
144
145         if has_role('rtmaster') {
146                 include roles::rtmaster
147         }
148
149         if has_role('udd') {
150                 include roles::udd
151         }
152
153         if has_role('sso') {
154                 include roles::sso
155         }
156
157         if has_role('tracker') {
158                 include roles::tracker
159         }
160
161         if has_role('buildd_master') {
162                 include roles::buildd_master
163         }
164
165         if has_role('piuparts') {
166                 include roles::piuparts
167         }
168
169         if has_role('contributors') {
170                 include roles::contributors
171         }
172
173         if has_role('nm') {
174                 include roles::nm
175         }
176
177         if has_role('release') {
178                 include roles::release
179         }
180
181         if has_role('rtc') {
182                 include roles::rtc
183         }
184
185         if has_role('keystone') {
186                 include roles::keystone
187         }
188
189         if has_role('postgres_backup_server') {
190                 include postgres::backup_server
191         }
192
193         if has_role('packages') {
194                 ssl::service { 'packages.debian.org':
195                         notify => Service['apache2'],
196                 }
197         }
198
199         if has_role('packagesqamaster') {
200                 ssl::service { 'packages.qa.debian.org':
201                         notify => Service['apache2'],
202                 }
203         }
204
205         if has_role('gobby_debian_org') {
206                 ssl::service { 'gobby.debian.org':
207                         tlsaport => 0,
208                 }
209         }
210 }