From b0c0ca5a8846526179ff9566f248405be011ef62 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 2 Mar 2011 21:45:15 +0100 Subject: [PATCH] v6addr need not exist --- modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.20.1