include roles::static_source
- package { 'libapache2-mod-macro':
- ensure => installed,
- }
+ package { 'libapache2-mod-macro': ensure => installed, }
+ package { 'libapache2-mod-geoip': ensure => installed, }
+ package { 'geoip-database': ensure => installed, }
apache2::module { 'macro': require => Package['libapache2-mod-macro']; }
apache2::module { 'rewrite': }
apache2::module { 'expires': }
+ apache2::module { 'geoip': require => [Package['libapache2-mod-geoip'], Package['geoip-database']]; }
file { '/usr/local/bin/static-mirror-run':
source => 'puppet:///modules/roles/static-mirroring/static-mirror-run',
}
file { '/etc/cron.d/puppet-static-mirror':
- 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",
+ content => "PATH=/usr/local/bin:/usr/bin:/bin\n@reboot staticsync sleep 60; for a in `awk '!/^ *(#|$)/ {printf \"%s:%s/-live-\\n\", $1, $2}' /etc/static-components.conf`; do static-mirror-run --one-stage /srv/static.debian.org \"$a\" > /dev/null; done\n",
}
$vhost_listen = $::hostname ? {
content => template('roles/static-mirroring/vhost/planet.debian.org.erb'),
}
- apache2::site { '10-static-vhosts-simple':
+ apache2::site { '010-static-vhosts-simple':
site => "static-vhosts-simple",
content => template('roles/static-mirroring/vhost/static-vhosts-simple.erb'),
}