From f1bbf66088e5d4e3a65c769cd7e21011d2109d84 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 20 Dec 2015 12:55:01 +0100 Subject: [PATCH] Add debug mirror --- hieradata/common.yaml | 3 +++ modules/roles/manifests/debug_mirror.pp | 11 ++++++++ modules/roles/manifests/init.pp | 4 +++ .../apache-debug.mirrors.debian.org.conf.erb | 26 +++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 modules/roles/manifests/debug_mirror.pp create mode 100644 modules/roles/templates/apache-debug.mirrors.debian.org.conf.erb diff --git a/hieradata/common.yaml b/hieradata/common.yaml index 1b9d84607..0e85c9987 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -170,3 +170,6 @@ roles: - gombert.debian.org veyepar.debian.org: - vittoria.debian.org + mirror_debug: + - klecker.debian.org + - mirror-isc.debian.org diff --git a/modules/roles/manifests/debug_mirror.pp b/modules/roles/manifests/debug_mirror.pp new file mode 100644 index 000000000..c2ec74afe --- /dev/null +++ b/modules/roles/manifests/debug_mirror.pp @@ -0,0 +1,11 @@ +class roles::debug_mirror { + $vhost_listen = $::hostname ? { + klecker => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80', + default => '*:80', + } + + apache2::site { '010-debug.mirrors.debian.org': + site => 'debug.mirrors.debian.org', + content => template('roles/apache-debug.mirrors.debian.org.erb'), + } +} diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index aaada6438..fb46df79a 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -69,6 +69,10 @@ class roles { include roles::www_mirror } + if has_role('mirror_debug') { + include roles::debug_mirror + } + if has_role('ftp.d.o') { include roles::ftp } diff --git a/modules/roles/templates/apache-debug.mirrors.debian.org.conf.erb b/modules/roles/templates/apache-debug.mirrors.debian.org.conf.erb new file mode 100644 index 000000000..58f7de024 --- /dev/null +++ b/modules/roles/templates/apache-debug.mirrors.debian.org.conf.erb @@ -0,0 +1,26 @@ +## +## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## + + + > + ServerAdmin webmaster@debian.org + ServerName debug.mirrors.debian.org + + RedirectMatch "^/$" /debian-debug/ + Alias /debian-debug /srv/mirrors/debian-debug + + ErrorLog /var/log/apache2/debug.mirrors.debian.org-error.log + LogLevel warn + CustomLog /var/log/apache2/debug.mirrors.debian.org-access.log privacy + + + Require all granted + IndexOptions NameWidth=* +SuppressDescription + Options +Indexes + Options +FollowSymLinks + + + + -- 2.20.1