From: Peter Palfrader Date: Sun, 9 Dec 2012 12:07:28 +0000 (+0100) Subject: Try this instead. III X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=3d61b6c0fcbab717ce99bd5c070ea83983b6bbc5;p=mirror%2Fdsa-puppet.git Try this instead. III --- diff --git a/modules/roles/files/static-mirroring/vhost/planet.debian.org b/modules/roles/files/static-mirroring/vhost/planet.debian.org deleted file mode 100644 index 8bda41fb1..000000000 --- a/modules/roles/files/static-mirroring/vhost/planet.debian.org +++ /dev/null @@ -1,22 +0,0 @@ -Include /etc/apache2/inc/static-mirror-vhost - ServerName planet.debian.org - ServerAlias planet.debian.net planeta.debian.net - ServerAdmin planet@debian.org - - ErrorLog /var/log/apache2/planet.debian.org-error.log - CustomLog /var/log/apache2/planet.debian.org-access.log combined - - - UserDir disabled - - - DocumentRoot /srv/static.debian.org/cur/planet.debian.org - AddDefaultCharset utf-8 - - RewriteEngine On - RewriteCond %{HTTP_HOST} ^planeta.debian.net$ [NC] - RewriteRule ^/(.*) http://planet.debian.org/es/$1 [R=permanent,L] - RewriteCond %{HTTP_HOST} ^planet.debian.net$ [NC] - RewriteRule ^/(.*) http://planet.debian.org/$1 [R=permanent,L] - -# vim:set syn=apache: diff --git a/modules/roles/manifests/static_mirror.pp b/modules/roles/manifests/static_mirror.pp index 8ba0fe91c..958d72243 100644 --- a/modules/roles/manifests/static_mirror.pp +++ b/modules/roles/manifests/static_mirror.pp @@ -24,18 +24,16 @@ class roles::static_mirror inherits roles::static_source { "/etc/cron.d/puppet-static-mirror": content => "PATH=/usr/local/bin:/usr/bin:/bin\n@reboot staticsync sleep 60; static-mirror-run --one-stage /srv/static.debian.org bizet.debian.org:-live- > /dev/null\n", ; + } - '/etc/apache2/inc': - ensure => directory, - ; - '/etc/apache2/inc/static-mirror-vhost': - content => template('roles/static-mirroring/apache-inc-static-mirror-vhost.erb'), - ; + $vhost_listen = $::hostname ? { + klecker => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80', + default => '*:80', } apache2::site { '010-planet.debian.org': site => 'planet.debian.org', - source => 'puppet:///modules/roles/static-mirroring/vhost/planet.debian.org', + content => 'puppet:///modules/roles/static-mirroring/vhost/planet.debian.org.erb', } } # vim:set et: diff --git a/modules/roles/templates/static-mirroring/apache-inc-static-mirror-vhost.erb b/modules/roles/templates/static-mirroring/apache-inc-static-mirror-vhost.erb deleted file mode 100644 index 5c35f719d..000000000 --- a/modules/roles/templates/static-mirroring/apache-inc-static-mirror-vhost.erb +++ /dev/null @@ -1,9 +0,0 @@ -## -## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. -## - -<% if hostname == "klecker" -%> - -<% else -%> - -<% end -%> diff --git a/modules/roles/templates/static-mirroring/vhost/planet.debian.org.erb b/modules/roles/templates/static-mirroring/vhost/planet.debian.org.erb new file mode 100644 index 000000000..d814211a2 --- /dev/null +++ b/modules/roles/templates/static-mirroring/vhost/planet.debian.org.erb @@ -0,0 +1,22 @@ + > + ServerName planet.debian.org + ServerAlias planet.debian.net planeta.debian.net + ServerAdmin planet@debian.org + + ErrorLog /var/log/apache2/planet.debian.org-error.log + CustomLog /var/log/apache2/planet.debian.org-access.log combined + + + UserDir disabled + + + DocumentRoot /srv/static.debian.org/cur/planet.debian.org + AddDefaultCharset utf-8 + + RewriteEngine On + RewriteCond %{HTTP_HOST} ^planeta.debian.net$ [NC] + RewriteRule ^/(.*) http://planet.debian.org/es/$1 [R=permanent,L] + RewriteCond %{HTTP_HOST} ^planet.debian.net$ [NC] + RewriteRule ^/(.*) http://planet.debian.org/$1 [R=permanent,L] + +# vim:set syn=apache: