6 ldap = LDAP::SSLConn.new('db.debian.org', 636)
7 ldap.search2('ou=hosts,dc=debian,dc=org', LDAP::LDAP_SCOPE_SUBTREE, '(hostname=*)', attrs='*', false, 0, 0).each do |x|
8 results[x['hostname'][0]] = x
11 open('ldapinfo.rb', 'w') do |f|
13 module Puppet::Parser::Functions
14 newfunction(:ldapinfo, :type => :rvalue) do |attributes|
15 host = attributes.shift
16 results = #{results.to_s}