From: Peter Palfrader Date: Wed, 16 May 2012 10:11:43 +0000 (+0200) Subject: Do not blow up if a host does not have purpose set X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=commitdiff_plain;h=9f5bc1d031a2ff59d2ff4c444cff24eea1d8d94a Do not blow up if a host does not have purpose set --- diff --git a/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb b/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb index 6c32a71b..63c6fcaf 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb @@ -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']