X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fports_mirror.pp;h=a2f5bfa8a584b1468e1e571bf92c1934fa6b0d1a;hb=d6c51f5d95c96f0edbe5096bf0ae4520a82e85f9;hp=ff0d6014e77f9389c4873570afd215b7569105a1;hpb=a12917959f1de3525ee686542406f12f3ff06e0c;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/ports_mirror.pp b/modules/roles/manifests/ports_mirror.pp index ff0d6014e..a2f5bfa8a 100644 --- a/modules/roles/manifests/ports_mirror.pp +++ b/modules/roles/manifests/ports_mirror.pp @@ -1,12 +1,31 @@ class roles::ports_mirror { + include roles::archvsync_base + $vhost_listen = $::hostname ? { - klecker => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80', - mirror-isc => '149.20.20.22:80 [2001:4f8:8:36::1deb:22]:80', + klecker => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80 [2001:67c:2564:a119::148:14]:80', + mirror-isc => '149.20.4.15:80 [2001:4f8:1:c::15]:80', default => '*:80', } + $onion_v4_addr = $::hostname ? { + klecker => '130.89.148.14', + mirror-isc => '149.20.4.15', + default => undef, + } apache2::site { '010-ftp.ports.debian.org': site => 'ftp.ports.debian.org', content => template('roles/apache-ftp.ports.debian.org.erb'), } + + if has_role('static_mirror_onion') { + if ! $onion_v4_addr { + fail("Do not have an onion_v4_addr set for $::hostname.") + } + + onion::service { 'ftp.ports.debian.org': + port => 80, + target_port => 80, + target_address => $onion_v4_addr, + } + } }