results['ldap'] = function_ldapinfo(host, '*')
results['misc'] = {}
- # find out if we are behind nat
- v4addrs = $v4ips.split(',')
- intersection = v4addrs & nodeinfo['ldap']['ipHostNumber']
- results['misc']['natted'] = intersection.empty?
+ fqdn = lookupvar('fqdn')
+ if fqdn and fqdn == host
+ v4ips = lookupvar('v4ips')
+ if v4ips
+ # find out if we are behind nat
+ v4addrs = v4ips.split(',')
+ intersection = v4addrs & results['ldap']['ipHostNumber']
+ results['misc']['natted'] = intersection.empty?
+ end
+ end
return(results)
end