From 3d61b6c0fcbab717ce99bd5c070ea83983b6bbc5 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 9 Dec 2012 13:07:28 +0100 Subject: [PATCH] Try this instead. III --- modules/roles/manifests/static_mirror.pp | 12 +++++------- .../apache-inc-static-mirror-vhost.erb | 9 --------- .../static-mirroring/vhost/planet.debian.org.erb} | 2 +- 3 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 modules/roles/templates/static-mirroring/apache-inc-static-mirror-vhost.erb rename modules/roles/{files/static-mirroring/vhost/planet.debian.org => templates/static-mirroring/vhost/planet.debian.org.erb} (93%) 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/files/static-mirroring/vhost/planet.debian.org b/modules/roles/templates/static-mirroring/vhost/planet.debian.org.erb similarity index 93% rename from modules/roles/files/static-mirroring/vhost/planet.debian.org rename to modules/roles/templates/static-mirroring/vhost/planet.debian.org.erb index 8bda41fb1..d814211a2 100644 --- a/modules/roles/files/static-mirroring/vhost/planet.debian.org +++ b/modules/roles/templates/static-mirroring/vhost/planet.debian.org.erb @@ -1,4 +1,4 @@ -Include /etc/apache2/inc/static-mirror-vhost + > ServerName planet.debian.org ServerAlias planet.debian.net planeta.debian.net ServerAdmin planet@debian.org -- 2.20.1