Set vhost_listen variables required by apache-www.debian.org template
[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                 notify  => Exec['service apache2 reload'],
16         }
17         concat::fragment { 'anonscm.map-header':
18                 target => '/etc/apache2/conf-available/anonscm.map.conf',
19                 order  => '000',
20                 content  => @(EOF)
21                         ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
22                         <Macro anonscm.debian.org-anonscm-map>
23                         | EOF
24         }
25         concat::fragment { 'anonscm.map-body':
26                 target => '/etc/apache2/conf-available/anonscm.map.conf',
27                 order  => '400',
28                 source => 'puppet:///modules/roles/anonscm/anonscm.map',
29         }
30         concat::fragment { 'anonscm.map-tail':
31                 target => '/etc/apache2/conf-available/anonscm.map.conf',
32                 order  => '900',
33                 content  => @(EOF)
34                         </Macro>
35                         | EOF
36         }
37         file { "/etc/apache2/conf-enabled/anonscm.map.conf":
38                 ensure => link,
39                 target => "../conf-available/anonscm.map.conf",
40                 notify  => Exec['service apache2 reload'],
41         }
42
43         file { '/srv/anonscm.debian.org':
44                 ensure  => directory,
45         }
46
47         file { '/srv/anonscm.debian.org/htdocs':
48                 ensure  => directory,
49         }
50
51         file { '/srv/anonscm.debian.org/htdocs/index.html':
52                 source => 'puppet:///modules/roles/anonscm/index.html',
53         }
54 }