From: Peter Palfrader Date: Wed, 2 Mar 2011 20:45:15 +0000 (+0100) Subject: v6addr need not exist X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=b0c0ca5a8846526179ff9566f248405be011ef62;p=mirror%2Fdsa-puppet.git v6addr need not exist --- diff --git a/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb b/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb index 28da4aea4..41a071afc 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb @@ -39,8 +39,8 @@ module Puppet::Parser::Functions if nodeinfo['hoster']['allow_dns_query'] raise Puppet::ParseError, "No nameservers listed for #{nodeinfo['hoster']['name']} yet we should answer somebody's queries? That makes no sense." end - elsif (nodeinfo['hoster']['nameservers'] & nodeinfo['misc']['v4addrs']).size > 0 or - (nodeinfo['hoster']['nameservers'] & nodeinfo['misc']['v6addrs']).size > 0 + elsif (nodeinfo['misc']['v4addrs'] and (nodeinfo['hoster']['nameservers'] & nodeinfo['misc']['v4addrs']).size > 0) or + (nodeinfo['misc']['v6addrs'] and (nodeinfo['hoster']['nameservers'] & nodeinfo['misc']['v6addrs']).size > 0) # this host is listed as a nameserver at this location nodeinfo['misc']['resolver-recursive'] = true