git_master -> 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         #
38         # security.debian.org
39         if has_role('security_master') {
40                 include roles::security_master
41                 include roles::dakmaster
42         }
43
44         if has_role('security_mirror') {
45                 include roles::security_mirror
46         }
47
48         if has_role('wiki') {
49                 include roles::wiki
50         }
51
52         if has_role('syncproxy') {
53                 include roles::syncproxy
54         }
55
56         if has_role('mailrelay') {
57                 include roles::mailrelay
58         }
59
60         if has_role('dns_primary') {
61                 include roles::dns_primary
62         }
63
64         if has_role('dns_geo') {
65                 include roles::dns_geodns
66         }
67
68         if has_role('security_tracker') {
69                 include roles::security_tracker
70         }
71
72         if has_role('rtmaster') {
73                 include roles::rtmaster
74         }
75
76         if has_role('udd') {
77                 include roles::udd
78         }
79
80         if has_role('sso') {
81                 include roles::sso
82         }
83
84         if has_role('sso_rp') {
85                 include roles::sso_rp
86         }
87
88         if has_role('postgres_backup_server') {
89                 include postgres::backup_server
90         }
91
92
93         if has_role('qamaster') {
94                 ssl::service { 'qa.debian.org': notify  => Exec['service apache2 reload'], key => true, }
95         }
96
97         if has_role('packagesqamaster') {
98                 ssl::service { 'packages.qa.debian.org': notify  => Exec['service apache2 reload'], key => true, }
99         }
100
101         if $::hostname in [lw01, lw02, lw03, lw04, lw09, lw10] {
102                 include roles::snapshot
103         }
104
105         if has_role('snapshot_web') {
106                 include roles::snapshot_web
107         }
108
109         if has_role('snapshot_shell') {
110                 include roles::snapshot_shell
111         }
112
113         if has_role('ports_master') {
114                 include roles::ports_master
115         }
116
117         if has_role('onionbalance') {
118                 include onion::balance
119         }
120         if has_role('bgp') {
121                 include roles::bgp
122         }
123
124         if has_role('postgresql_server') {
125                 include postgres::backup_source
126         }
127
128         if $::keyring_debian_org_mirror {
129                 include roles::keyring_debian_org_mirror
130         }
131
132         if has_role('popcon') {
133                 include roles::popcon
134         }
135 }