From 528754fc87a34d863d61e24824da39585865a0cb Mon Sep 17 00:00:00 2001 From: Martin Zobel-Helas Date: Thu, 30 Jul 2009 13:32:30 +0200 Subject: [PATCH] new security.d.o apache2 class --- manifests/site.pp | 5 +++ .../sites-available/security.debian.org | 33 +++++++++++++++++++ modules/apache2/manifests/security.pp | 12 +++++++ modules/debian-org/misc/local.yaml | 2 ++ 4 files changed, 52 insertions(+) create mode 100644 modules/apache2/files/common/etc/apache2/sites-available/security.debian.org create mode 100644 modules/apache2/manifests/security.pp diff --git a/manifests/site.pp b/manifests/site.pp index a88b72801..06719f459 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -59,6 +59,11 @@ node default { "true": { include buildd } default: { } } + case extractnodeinfo($nodeinfo, 'apache2_security_mirror') { + "true": { include security_mirror } + default: { } + } + # maybe wait for rietz to be upgraded to lenny # case $hostname { diff --git a/modules/apache2/files/common/etc/apache2/sites-available/security.debian.org b/modules/apache2/files/common/etc/apache2/sites-available/security.debian.org new file mode 100644 index 000000000..39122a6ba --- /dev/null +++ b/modules/apache2/files/common/etc/apache2/sites-available/security.debian.org @@ -0,0 +1,33 @@ + + IndexOptions NameWidth=* +SuppressDescription + Options +FollowSymLinks + Options +Indexes + FileETag MTime Size + + + + ServerAdmin debian-admin@debian.org + DocumentRoot /org/security.debian.org/ftp + ServerPath /debian-security + ServerName security.debian.org + ServerAlias security.ipv6.debian.org + ServerAlias security.eu.debian.org + ServerAlias security.us.debian.org + ServerAlias security.na.debian.org + ServerAlias security.geo.debian.org + ServerAlias security-nagios.debian.org + + Alias /debian-security /org/security.debian.org/ftp + + RewriteEngine on + RewriteRule ^/$ http://www.debian.org/security/ + + # Possible values include: debug, info, notice, warn, error, crit, + # alert, emerg. + LogLevel warn + + CustomLog /var/log/apache2/security.debian.org-access.log combined + ServerSignature On + + + diff --git a/modules/apache2/manifests/security.pp b/modules/apache2/manifests/security.pp new file mode 100644 index 000000000..8f0a229af --- /dev/null +++ b/modules/apache2/manifests/security.pp @@ -0,0 +1,12 @@ +class apache2::security inherits apache2 { + file { + "/etc/apache2/sites-available/security.debian.org": + source => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/sites-available/security.debian.org", + "puppet:///apache2/common/etc/apache2/sites-available/security.debian.org" ], + require => Package["apache2"], + notify => Exec["apache2 reload"]; + + } + +} + diff --git a/modules/debian-org/misc/local.yaml b/modules/debian-org/misc/local.yaml index e03d9e34e..6bff27a69 100644 --- a/modules/debian-org/misc/local.yaml +++ b/modules/debian-org/misc/local.yaml @@ -119,6 +119,8 @@ host_settings: - villa.debian.org - wieck.debian.org - wolkenstein.debian.org + apache2_security_mirror: + - gluck.debian.org buildd: - ancina.debian.org - arcadelt.debian.org -- 2.20.1