}
}
- case extractnodeinfo($nodeinfo, 'apache2_defaultconfig') {
- "true": { include apache2 }
+ case $apache2 {
+ "true": {
+ case extractnodeinfo($nodeinfo, 'apache2_security_mirror') {
+ "true": { include apache2::security_mirror }
+ default { include apache2 }
+ }
+ }
}
case extractnodeinfo($nodeinfo, 'buildd') {
"true": { include buildd }
}
- case extractnodeinfo($nodeinfo, 'apache2_security_mirror') {
- "true": { include apache2::security_mirror }
- }
-
# maybe wait for rietz to be upgraded to lenny
case $hostname {
"logrotate": ensure => installed;
}
+ define activate_apache_site($ensure=present, $site=$name) {
+ case $site {
+ "": { $base = $name }
+ default: { $base = $site }
+ }
+
+ case $ensure {
+ present: {
+ file { "/etc/apache2/sites-enabled/$name":
+ ensure => "/etc/apache2/sites-available/$base",
+ require => Package["apache2"],
+ notify => Exec["reload-apache2"];
+ }
+ }
+ absent: {
+ file { "/etc/apache2/sites-enabled/$name":
+ ensure => $ensure,
+ notify => Exec["reload-apache2"];
+ }
+ }
+ default: { err ( "Unknown ensure value: '$ensure'" ) }
+ }
+ }
+
define enable_module($ensure=present) {
case $ensure {
present: {
"status":;
}
+ activate_apache_site {
+ "00-default": site => "default-debian.org";
+ "000-default": ensure => absent;
+ }
+
file {
"/etc/apache2/conf.d/ressource-limits":
content => template("apache2/ressource-limits.erb"),
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["reload-apache2"];
+ "puppet:///apache2/common/etc/apache2/sites-available/security.debian.org" ];
}
+ activate_apache_site {
+ "010-security.debian.org": site => "security.debian.org";
+ "security.debian.org": ensure => absent;
+ }
+
}
- ries.debian.org
- rietz.debian.org
- spohr.debian.org
- apache2_defaultconfig:
- - bellini.debian.org
- - carver.debian.org
- - cimarosa.debian.org
- - draghi.debian.org
- - duarte.debian.org
- - gluck.debian.org
- - kaufmann.debian.org
- - klecker.debian.org
- - liszt.debian.org
- - lobos.debian.org
- - piatti.debian.org
- - raff.debian.org
- - ravel.debian.org
- - respighi.debian.org
- - ries.debian.org
- - rore.debian.org
- - saens.debian.org
- - samosa.debian.org
- - schein.debian.org
- - senfl.debian.org
- - soler.debian.org
- - spohr.debian.org
- - steffani.debian.org
- - tartini.debian.org
- - villa.debian.org
- - widor.debian.org
- - wieck.debian.org
- - wolkenstein.debian.org
apache2_security_mirror:
- gluck.debian.org
- kassia.debian.org