move info on whether to install apache2 default config from manifest to nodeinfo...
authorPeter Palfrader <peter@palfrader.org>
Tue, 26 May 2009 17:45:07 +0000 (19:45 +0200)
committerPeter Palfrader <peter@palfrader.org>
Tue, 26 May 2009 17:45:07 +0000 (19:45 +0200)
files/etc/puppet/lib/puppet/parser/functions/nodeinfo.rb
manifests/site.pp
modules/debian-org/misc/local.yaml

index e9c8132..9f849ff 100644 (file)
@@ -51,6 +51,10 @@ module Puppet::Parser::Functions
       results['heavy_exim']    = "true"
     end
 
+    if yaml.has_key?('apache2_defaultconfig') and yaml['apache2_defaultconfig'].include?(host)
+      results['apache2_defaultconfig']    = "true"
+    end
+
     ldap = LDAP::Conn.new('db.debian.org')
 
     results['ldap'] = []
index 2135141..2e8000b 100644 (file)
@@ -50,13 +50,10 @@ node default {
        }
     }
 
-    case $apache2 {
-        "true":    { case $hostname {
-                        carver,rore,draghi,tartini,samosa,duarte,piatti:  { include apache2 }
-                        default:   {}
-                   } }
-        default: {}
-    }
+     case extractnodeinfo($nodeinfo, 'apache2_defaultconfig') {
+          "true":  { include apache2 }
+           default: { }
+     }
 
     case $hostname {
         ancina,arcadelt,argento,brahms,goedel,goetz,lafayette,malo,murphy,praetorius,puccini,paer:
index 8dcf193..62b615a 100644 (file)
@@ -80,6 +80,14 @@ heavy_exim:
   - rietz.debian.org
   - klecker.debian.org
   - powell.debian.org
+apache2_defaultconfig:
+  - carver.debian.org
+  - draghi.debian.org
+  - duarte.debian.org
+  - piatti.debian.org
+  - rore.debian.org
+  - samosa.debian.org
+  - tartini.debian.org
 services:
   bugsmaster: rietz.debian.org
   qamaster: merkel.debian.org