X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fstatic_mirror.pp;h=fca65b443dbbf2b26adb10b0174234aac00478da;hb=5022b517840424d7ca7fb87b9c5868d91f83db5d;hp=c73e69fb40afad42f42e165f386bd1331f7f1d17;hpb=91f588391a33dbde7b65cc1849c0e39b1538e504;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/static_mirror.pp b/modules/roles/manifests/static_mirror.pp index c73e69fb4..fca65b443 100644 --- a/modules/roles/manifests/static_mirror.pp +++ b/modules/roles/manifests/static_mirror.pp @@ -1,14 +1,14 @@ class roles::static_mirror { include roles::static_source + include apache2::cache - 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 { 'include': } + apache2::module { 'ssl': } apache2::module { 'geoip': require => [Package['libapache2-mod-geoip'], Package['geoip-database']]; } file { '/usr/local/bin/static-mirror-run': @@ -31,8 +31,12 @@ class roles::static_mirror { klecker => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80', default => '*:80', } + $vhost_listen_443 = $::hostname ? { + klecker => '130.89.148.14:443 [2001:610:1908:b000::148:14]:443', + default => '*:443', + } - apache2::config { "local-static-vhost.conf": + apache2::config { 'local-static-vhost.conf': content => template('roles/static-mirroring/static-vhost.conf.erb'), } @@ -42,7 +46,20 @@ class roles::static_mirror { } apache2::site { '010-static-vhosts-simple': - site => "static-vhosts-simple", + site => 'static-vhosts-simple', content => template('roles/static-mirroring/vhost/static-vhosts-simple.erb'), } + + $wwwdo_document_root = '/srv/static.debian.org/mirrors/www.debian.org/cur' + apache2::site { '010-www.debian.org': + site => 'www.debian.org', + content => template('roles/apache-www.debian.org.erb'), + } + + ssl::service { 'dsa.debian.org': + notify => Service['apache2'], + } + ssl::service { 'www.debian.org': + notify => Service['apache2'], + } }