- nodeinfo = function_yamlinfo(host, yamlfile)
- nodeinfo['ldap'] = function_ldapinfo(host, '*')
- unless nodeinfo['ldap']['ipHostNumber']
- 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['misc'] = {}
- fqdn = lookupvar('fqdn')
- if fqdn and fqdn == host
- v4ips = lookupvar('v4ips')
- if v4ips
- nodeinfo['misc']['v4addrs'] = v4ips.split(',')
-
- # find out if we are behind nat
- intersection = nodeinfo['misc']['v4addrs'] & nodeinfo['ldap']['ipHostNumber']
- nodeinfo['misc']['natted'] = intersection.empty?
+ nodeinfo = function_yamlinfo([host, yamlfile])
+ nodeinfo['ldap'] = function_ldapinfo([host, '*'])
+ unless nodeinfo['ldap']['ipHostNumber']
+ raise Puppet::ParseError, "Host #{host} does not have ipHostNumber values in ldap"