From: Julien Cristau Date: Wed, 27 Jul 2016 17:19:33 +0000 (+0200) Subject: Move the Cache-Control setting for package archives to a macro X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=dd58830d6f8557e2f442905a655ca78bfe69dfe4;p=mirror%2Fdsa-puppet.git Move the Cache-Control setting for package archives to a macro Signed-off-by: Julien Cristau --- diff --git a/modules/apache2/files/puppet-ftp-macros b/modules/apache2/files/puppet-ftp-macros new file mode 100644 index 000000000..e3c9a55f3 --- /dev/null +++ b/modules/apache2/files/puppet-ftp-macros @@ -0,0 +1,21 @@ + + + + + + Header set Cache-Control "public, max-age=2592000" + + + + + Header set Cache-Control "public, max-age=120" + + + + + Header set Cache-Control "public, max-age=2592000" + + + + + diff --git a/modules/apache2/manifests/init.pp b/modules/apache2/manifests/init.pp index b8e76ad8e..a2429ebda 100644 --- a/modules/apache2/manifests/init.pp +++ b/modules/apache2/manifests/init.pp @@ -87,6 +87,10 @@ class apache2 { source => 'puppet:///modules/apache2/puppet-ssl-macros', } + apache2::config { 'puppet-ftp-macros': + source => 'puppet:///modules/apache2/puppet-ftp-macros', + } + apache2::config { 'puppet-config': content => template('apache2/puppet-config.erb'), } diff --git a/modules/roles/templates/apache-debug.mirrors.debian.org.erb b/modules/roles/templates/apache-debug.mirrors.debian.org.erb index 7a5a5923a..51c4545d4 100644 --- a/modules/roles/templates/apache-debug.mirrors.debian.org.erb +++ b/modules/roles/templates/apache-debug.mirrors.debian.org.erb @@ -20,22 +20,5 @@ Options +Indexes Options +FollowSymLinks - - - Header set Cache-Control "public, max-age=2592000" - - - - - Header set Cache-Control "public, max-age=120" - - - - - Header set Cache-Control "public, max-age=2592000" - - - + Use ftp-archive /srv/mirrors/debian-debug - - diff --git a/modules/roles/templates/apache-ftp.ports.debian.org.erb b/modules/roles/templates/apache-ftp.ports.debian.org.erb index c9c88af89..42c3fb24d 100644 --- a/modules/roles/templates/apache-ftp.ports.debian.org.erb +++ b/modules/roles/templates/apache-ftp.ports.debian.org.erb @@ -21,21 +21,7 @@ Options +Indexes Options +FollowSymLinks - - - Header set Cache-Control "public, max-age=2592000" - - - - - Header set Cache-Control "public, max-age=120" - - - - - Header set Cache-Control "public, max-age=2592000" - - + Use ftp-archive /srv/mirrors/debian-ports Alias /debian-ports-cd /srv/mirrors/debian-ports-cd @@ -45,5 +31,3 @@ Options +FollowSymLinks - -