From: Peter Palfrader Date: Tue, 12 Sep 2017 09:47:04 +0000 (+0000) Subject: Make ports mirror template use an @archive_root and @archive_cd_root variable defined... X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=51bfbc36a29563fa089b58255add106a2e09ab60;p=mirror%2Fdsa-puppet.git Make ports mirror template use an @archive_root and @archive_cd_root variable defined in the manifest --- diff --git a/modules/roles/manifests/ports_mirror.pp b/modules/roles/manifests/ports_mirror.pp index a2f5bfa8a..80ca8b5d5 100644 --- a/modules/roles/manifests/ports_mirror.pp +++ b/modules/roles/manifests/ports_mirror.pp @@ -11,6 +11,12 @@ class roles::ports_mirror { mirror-isc => '149.20.4.15', default => undef, } + $archive_root = $::hostname ? { + default => '/srv/mirrors/debian-ports', + } + $archive_cd_root = $::hostname ? { + default => '/srv/mirrors/debian-ports-cd', + } apache2::site { '010-ftp.ports.debian.org': site => 'ftp.ports.debian.org', diff --git a/modules/roles/templates/apache-ftp.ports.debian.org.erb b/modules/roles/templates/apache-ftp.ports.debian.org.erb index a9d4058e4..1479916cd 100644 --- a/modules/roles/templates/apache-ftp.ports.debian.org.erb +++ b/modules/roles/templates/apache-ftp.ports.debian.org.erb @@ -15,11 +15,11 @@ RedirectMatch "^/$" /debian-ports/ - Alias /debian-ports /srv/mirrors/debian-ports - Use ftp-archive /srv/mirrors/debian-ports + Alias /debian-ports <%= @archive_root %> + Use ftp-archive <%= @archive_root %> - Alias /debian-ports-cd /srv/mirrors/debian-ports-cd - + Alias /debian-ports-cd <%= @archive_cd_root %> + > Require all granted Options +Indexes Options +FollowSymLinks