1 module Puppet::Parser::Functions
2 newfunction(:allnodeinfo, :type => :rvalue) do |attributes|
4 unless attributes.include?('hostname')
5 attributes << 'hostname'
8 ldap = LDAP::SSLConn.new('db.debian.org', 636)
11 filter = '(hostname=*)'
13 ldap.search2('ou=hosts,dc=debian,dc=org', LDAP::LDAP_SCOPE_SUBTREE, filter, attrs=attributes, false, 0, 0, s_attr="hostname") do |x|
16 rescue LDAP::ResultError