From: Peter Palfrader Date: Thu, 26 May 2016 15:53:01 +0000 (+0200) Subject: ports mirrors X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=65139996ecd9fed4bb7498e6ac9e73fdaa6920ac;p=mirror%2Fdsa-puppet.git ports mirrors --- diff --git a/hieradata/common.yaml b/hieradata/common.yaml index 0416d82ae..d3a2c110d 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -190,6 +190,9 @@ roles: mirror_debug: - klecker.debian.org - mirror-isc.debian.org + mirror_ports: + - klecker.debian.org + - mirror-isc.debian.org planet_search: - philp.debian.org i18n.d.o: diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index 4c3553acd..cf7bfb541 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -79,6 +79,9 @@ class roles { if has_role('mirror_debug') { include roles::debug_mirror } + if has_role('mirror_ports') { + include roles::ports_mirror + } if has_role('ftp.d.o') { include roles::ftp diff --git a/modules/roles/manifests/ports_mirror.pp b/modules/roles/manifests/ports_mirror.pp new file mode 100644 index 000000000..020041141 --- /dev/null +++ b/modules/roles/manifests/ports_mirror.pp @@ -0,0 +1,12 @@ +class roles::ports_mirror { + $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', + default => '*:80', + } + + apache2::site { '010-ports.mirrors.debian.org': + site => 'ports.mirrors.debian.org', + content => template('roles/apache-ftp.ports.debian.org.erb'), + } +} diff --git a/modules/roles/templates/apache-debug.mirrors.debian.org.erb b/modules/roles/templates/apache-debug.mirrors.debian.org.erb index e29a23c06..f20d4b609 100644 --- a/modules/roles/templates/apache-debug.mirrors.debian.org.erb +++ b/modules/roles/templates/apache-debug.mirrors.debian.org.erb @@ -4,7 +4,7 @@ ## > - ServerAdmin webmaster@debian.org + ServerAdmin debian-admin@debian.org ServerName debug.mirrors.debian.org RedirectMatch "^/$" /debian-debug/ diff --git a/modules/roles/templates/apache-ftp.ports.debian.org.erb b/modules/roles/templates/apache-ftp.ports.debian.org.erb new file mode 100644 index 000000000..d6328bdd4 --- /dev/null +++ b/modules/roles/templates/apache-ftp.ports.debian.org.erb @@ -0,0 +1,25 @@ +## +## 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 debian-admin@debian.org + ServerName ftp.ports.debian.org + + RedirectMatch "^/$" /debian-ports/ + Alias /debian-ports /srv/mirrors/debian-ports + + ErrorLog /var/log/apache2/ftp.ports.debian.org-error.log + LogLevel warn + CustomLog /var/log/apache2/ftp.ports.debian.org-access.log privacy + + + Require all granted + IndexOptions NameWidth=* +SuppressDescription + Options +Indexes + Options +FollowSymLinks + + + +