Merge branch 'master' of ssh://handel.debian.org/srv/puppet.debian.org/git/dsa-puppet
[mirror/dsa-puppet.git] / files / etc / puppet / lib / puppet / parser / functions / nodeinfo.rb
index 84e5bc9..aa641c3 100644 (file)
@@ -22,10 +22,9 @@ module Puppet::Parser::Functions
     end
 
     if yaml.has_key?('services')
-      ['bugsmaster', 'qamaster', 'mailrelay', 'rtmaster', 'packagesmaster'].each do |service|
-        if yaml['services'].has_key?(service)
-          results[service] = host == yaml['services'][service]
-        end
+      yaml['services'].each_pair do |service, hostlist|
+        hostlist=[hostlist] unless hostlist.kind_of?(Array)
+        results[service] = hostlist.include?(host)
       end
     end
 
@@ -51,6 +50,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'] = []
@@ -67,3 +70,5 @@ module Puppet::Parser::Functions
     return(results)
   end
 end
+
+# vim: set fdm=marker ts=2 sw=2 et: