]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Do not blow up if a host does not have purpose set
authorPeter Palfrader <peter@palfrader.org>
Wed, 16 May 2012 10:11:43 +0000 (12:11 +0200)
committerPeter Palfrader <peter@palfrader.org>
Wed, 16 May 2012 10:11:55 +0000 (12:11 +0200)
modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb

index 6c32a71b3e420e252712a2cc4adebedb91666cfd..63c6fcaf5c5f01b4c526f797d8db5b036c650ea2 100644 (file)
@@ -13,7 +13,7 @@ module Puppet::Parser::Functions
         raise Puppet::ParseError, "Host #{host} does not have ipHostNumber values in ldap"
       end
       nodeinfo['hoster'] = function_whohosts(nodeinfo['ldap']['ipHostNumber'], "/etc/puppet/modules/debian-org/misc/hoster.yaml")
-      nodeinfo['buildd'] = nodeinfo['ldap']['purpose'].include?('buildd')
+      nodeinfo['buildd'] = nodeinfo['ldap']['purpose'] and nodeinfo['ldap']['purpose'].include?('buildd')
 
       if lookupvar('::mta') == 'exim4'
         unless nodeinfo['heavy_exim']