X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fsyncproxy.pp;h=7e3423a906286e2f610778a73e13e3222d2b4816;hb=8f515ddb04dacc7c5ccb304639aefe6b6c7f921e;hp=bf19bd0166a609de6a0a638be5841663c4f590bc;hpb=3ce155eb07bfbe2ebeba80248ff92abf4d6cd147;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/syncproxy.pp b/modules/roles/manifests/syncproxy.pp index bf19bd016..7e3423a90 100644 --- a/modules/roles/manifests/syncproxy.pp +++ b/modules/roles/manifests/syncproxy.pp @@ -13,6 +13,13 @@ class roles::syncproxy { 'klecker' => '2001:610:1908:b000::148:10', default => '' } + $syncproxy_name = $::hostname ? { + 'milanollo' => 'syncproxy3.eu.debian.org', + 'mirror-isc' => 'syncproxy2.wna.debian.org', + 'mirror-umn' => 'syncproxy.cna.debian.org', + 'klecker' => 'syncproxy2.eu.debian.org', + default => 'unknown' + } rsync::site { 'syncproxy': content => template('roles/syncproxy/rsyncd.conf.erb'), @@ -29,4 +36,19 @@ class roles::syncproxy { group => 'mirroradm', mode => 0660, } + + if $::apache2 and $syncproxy_name != 'unknown' { + apache2::site { '010-syncproxy.debian.org': + site => 'security.debian.org', + content => template('roles/syncproxy/syncproxy.debian.org-apache.erb') + } + + file { [ '/srv/www/syncproxy.debian.org', '/srv/www/syncproxy.debian.org/htdocs' ]: + ensure => directory, + mode => '0755', + } + file { '/srv/www/syncproxy.debian.org/htdocs/index.html': + content => template('roles/syncproxy/syncproxy.debian.org-index.html.erb') + } + } }