In allnodeinfo distinguish between mandatory and required attributes
[mirror/dsa-puppet.git] / modules / puppetmaster / lib / puppet / parser / functions / ldapinfo.rb
index 3a68722..489970e 100644 (file)
@@ -14,11 +14,6 @@ module Puppet::Parser::Functions
     filter = '(hostname=' + host + ')'
     begin
       ldap.search2('ou=hosts,dc=debian,dc=org', LDAP::LDAP_SCOPE_SUBTREE, filter, attrs=attributes, false, 0, 0, s_attr="hostname").each do |x|
-        # If a returned value doesn't have all the attributes we're searching for, skip
-        # We'll skip if the array is empty, but we also seem to get back a nil object for empty attributes sometimes
-        unless attributes.include?("*")
-          next if attributes.any?{ |a|  not x[a] or x[a].empty? }
-        end
         results[x['hostname'][0]] = x
       end
     rescue LDAP::ResultError