0342a251e69a02206c784bfa10ed456dd69eafd4
[mirror/dsa-puppet.git] / modules / roles / manifests / anonscm.pp
1 class roles::anonscm {
2         include apache2
3         include apache2::rewrite
4
5         ssl::service { 'anonscm.debian.org':
6                 notify  => Exec['service apache2 reload'],
7                 key => true,
8         }
9         apache2::site { '020-anonscm.debian.org':
10                 site   => 'anonscm.debian.org',
11                 content => template('roles/anonscm/anonscm.debian.org.conf.erb')
12         }
13
14         concat { '/etc/apache2/conf-available/anonscm.map.conf': }
15         concat::fragment { 'anonscm.map-header':
16                 target => '/etc/apache2/conf-available/anonscm.map.conf',
17                 order  => '000',
18                 content  => @(EOF)
19                         ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
20                         <Macro anonscm.debian.org-anonscm-map>
21                         | EOF
22         }
23         concat::fragment { 'anonscm.map-body':
24                 target => '/etc/apache2/conf-available/anonscm.map.conf',
25                 order  => '400',
26                 source => 'puppet:///modules/roles/anonscm/anonscm.map',
27         }
28         concat::fragment { 'anonscm.map-tail':
29                 target => '/etc/apache2/conf-available/anonscm.map.conf',
30                 order  => '900',
31                 content  => @(EOF)
32                         </Macro anonscm.debian.org-anonscm-map>
33                         | EOF
34         }
35         file { "/etc/apache2/conf-enabled/anonscm.map.conf":
36                 ensure => link,
37                 target => "../conf-available/anonscm.map.conf",
38                 notify  => Exec['service apache2 reload'],
39         }
40 }