# find out if we have an ipv4 and/or an ipv6 address for our host in ldap.
nodeinfo['misc']['has_v4_ldap'] = nodeinfo['ldap']['ipHostNumber'].any? { |x| IPAddr.new(x).ipv4? }
nodeinfo['misc']['has_v6_ldap'] = nodeinfo['ldap']['ipHostNumber'].any? { |x| IPAddr.new(x).ipv6? }
+ nodeinfo['misc']['v4_ldap'] = nodeinfo['ldap']['ipHostNumber'].select { |x| IPAddr.new(x).ipv4? }
+ nodeinfo['misc']['v6_ldap'] = nodeinfo['ldap']['ipHostNumber'].select { |x| IPAddr.new(x).ipv6? }
end
ns = call_function('hiera',['nameservers'])