module Puppet::Parser::Functions
newfunction(:nodeinfo, :type => :rvalue) do |args|
+ require 'ipaddr'
+
host = args[0]
yamlfile = args[1]
begin
else
nodeinfo['misc']['v6addrs'] = []
end
+
+ # 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? }
end
ns = call_function('hiera',['nameservers'])