]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/roles/manifests/static_mirror.pp
make the lint gods happy
[dsa-puppet.git] / modules / roles / manifests / static_mirror.pp
1 class roles::static_mirror {
2
3         include roles::static_source
4
5         package { 'libapache2-mod-macro':
6                 ensure => installed,
7         }
8
9         apache2::module { 'macro': require => Package['libapache2-mod-macro']; }
10         apache2::module { 'rewrite': }
11         apache2::module { 'expires': }
12
13         file { '/usr/local/bin/static-mirror-run':
14                 source => 'puppet:///modules/roles/static-mirroring/static-mirror-run',
15                 mode   => '0555',
16         }
17
18         file { '/srv/static.debian.org':
19                 ensure => directory,
20                 owner  => staticsync,
21                 group  => staticsync,
22                 mode   => '02755'
23         }
24
25         file { '/etc/cron.d/puppet-static-mirror':
26                         content => "PATH=/usr/local/bin:/usr/bin:/bin\n@reboot staticsync sleep 60; static-mirror-run --one-stage /srv/static.debian.org bizet.debian.org:-live- > /dev/null\n",
27         }
28
29         $vhost_listen = $::hostname ? {
30                 klecker => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80',
31                 default => '*:80',
32         }
33
34         apache2::site { '010-planet.debian.org':
35                 site    => 'planet.debian.org',
36                 content => template('roles/static-mirroring/vhost/planet.debian.org.erb'),
37         }
38 }