From: Peter Palfrader Date: Tue, 12 Sep 2017 09:44:47 +0000 (+0000) Subject: Make debug mirror template use an @archive_root variable defined in the manifest X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=72dd53257640cad8c2734a8737e4d84d84fd37b6;p=mirror%2Fdsa-puppet.git Make debug mirror template use an @archive_root variable defined in the manifest --- diff --git a/modules/roles/manifests/debug_mirror.pp b/modules/roles/manifests/debug_mirror.pp index c178b1ef6..4e9c67304 100644 --- a/modules/roles/manifests/debug_mirror.pp +++ b/modules/roles/manifests/debug_mirror.pp @@ -12,6 +12,9 @@ class roles::debug_mirror { mirror-isc => '149.20.4.15', default => undef, } + $archive_root = $::hostname ? { + default => '/srv/mirrors/debian-debug', + } apache2::site { '010-debug.mirrors.debian.org': site => 'debug.mirrors.debian.org', diff --git a/modules/roles/templates/apache-debug.mirrors.debian.org.erb b/modules/roles/templates/apache-debug.mirrors.debian.org.erb index 103724733..40dcc113d 100644 --- a/modules/roles/templates/apache-debug.mirrors.debian.org.erb +++ b/modules/roles/templates/apache-debug.mirrors.debian.org.erb @@ -13,12 +13,12 @@ ServerAlias *.debug.backend.mirrors.debian.org RedirectMatch "^/$" /debian-debug/ - Alias /debian-debug /srv/mirrors/debian-debug + Alias /debian-debug <%= @archive_root %> ErrorLog /var/log/apache2/debug.mirrors.debian.org-error.log CustomLog /var/log/apache2/debug.mirrors.debian.org-access.log privacy - Use ftp-archive /srv/mirrors/debian-debug + Use ftp-archive <%= @archive_root %> UserDir disabled