# File lib/puppet/indirector/ldap.rb, line 61 61: def connection 62: unless defined? @connection and @connection 63: unless Puppet.features.ldap? 64: raise Puppet::Error, "Could not set up LDAP Connection: Missing ruby/ldap libraries" 65: end 66: begin 67: conn = Puppet::Util::Ldap::Connection.instance 68: conn.start 69: @connection = conn.connection 70: rescue => detail 71: puts detail.backtrace if Puppet[:trace] 72: raise Puppet::Error, "Could not connect to LDAP: %s" % detail 73: end 74: end 75: 76: return @connection 77: end