bacula_storage -> hiera role
[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         if has_role('muninmaster') {
11                 include munin::master
12         }
13
14         if has_role('nagiosmaster') {
15                 include nagios::server
16         }
17
18         # archive.debian.org
19         if has_role('historical_mirror') {
20                 include roles::historical_mirror
21         }
22
23         # debug archive
24         if has_role('debug_mirror') {
25                 include roles::debug_mirror
26         }
27
28         # ftp.debian.org and its ecosystem
29         if has_role('debian_mirror') {
30                 include roles::debian_mirror
31         }
32         if has_role('ftp_master') {
33                 include roles::ftp_master
34                 include roles::dakmaster
35                 include roles::signing
36         }
37         if has_role('ftp.upload.d.o') {
38                 include roles::ftp_upload
39         }
40         if has_role('ssh.upload.d.o') {
41                 include roles::ssh_upload
42         }
43         if has_role('security_upload') {
44                 include roles::security_upload
45         }
46         #
47         # security.debian.org
48         if has_role('security_master') {
49                 include roles::security_master
50                 include roles::dakmaster
51         }
52
53         if has_role('security_mirror') {
54                 include roles::security_mirror
55         }
56
57         if has_role('git_master') {
58                 include roles::git_master
59         }
60
61         if has_role('www_master') {
62                 include roles::www_master
63         }
64
65         if has_role('wiki') {
66                 include roles::wiki
67         }
68
69         if has_role('syncproxy') {
70                 include roles::syncproxy
71         }
72
73         if has_role('mailrelay') {
74                 include roles::mailrelay
75         }
76
77         if has_role('dns_primary') {
78                 include roles::dns_primary
79         }
80
81         if has_role('dns_geo') {
82                 include roles::dns_geodns
83         }
84
85         if has_role('security_tracker') {
86                 include roles::security_tracker
87         }
88
89         if has_role('rtmaster') {
90                 include roles::rtmaster
91         }
92
93         if has_role('udd') {
94                 include roles::udd
95         }
96
97         if has_role('sso') {
98                 include roles::sso
99         }
100
101         if has_role('sso_rp') {
102                 include roles::sso_rp
103         }
104
105         if has_role('postgres_backup_server') {
106                 include postgres::backup_server
107         }
108
109         if has_role('packages') {
110                 ssl::service { 'packages.debian.org': notify  => Exec['service apache2 reload'], key => true, }
111         }
112
113         if has_role('historicalpackages') {
114                 ssl::service { 'historical.packages.debian.org': notify  => Exec['service apache2 reload'], key => true, }
115         }
116
117         if has_role('qamaster') {
118                 ssl::service { 'qa.debian.org': notify  => Exec['service apache2 reload'], key => true, }
119         }
120
121         if has_role('packagesqamaster') {
122                 ssl::service { 'packages.qa.debian.org': notify  => Exec['service apache2 reload'], key => true, }
123         }
124
125         if $::hostname in [lw01, lw02, lw03, lw04, lw09, lw10] {
126                 include roles::snapshot
127         }
128
129         if has_role('snapshot_web') {
130                 include roles::snapshot_web
131         }
132
133         if has_role('snapshot_shell') {
134                 include roles::snapshot_shell
135         }
136
137         if has_role('planet_master') {
138                 include roles::planet_master
139         }
140         if has_role('planet_search') {
141                 ssl::service { 'planet-search.debian.org': notify  => Exec['service apache2 reload'], key => true, }
142         }
143
144         if has_role('i18n.d.o') {
145                 ssl::service { 'i18n.debian.org': notify  => Exec['service apache2 reload'], key => true, }
146         }
147
148         if has_role('l10n.d.o') {
149                 ssl::service { 'l10n.debian.org': notify  => Exec['service apache2 reload'], key => true, }
150         }
151
152         if has_role('ports_master') {
153                 include roles::ports_master
154         }
155
156         if has_role('onionbalance') {
157                 include onion::balance
158         }
159         if has_role('bgp') {
160                 include roles::bgp
161         }
162
163         if has_role('postgresql_server') {
164                 include postgres::backup_source
165         }
166
167         if $::keyring_debian_org_mirror {
168                 include roles::keyring_debian_org_mirror
169         }
170
171         if has_role('popcon') {
172                 include roles::popcon
173         }
174 }