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