]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Idiot. LDAP returns an array for all attributes, index into it for hash keys
authorStephen Gran <steve@lobefin.net>
Sat, 14 Nov 2009 19:17:30 +0000 (19:17 +0000)
committerStephen Gran <steve@lobefin.net>
Sat, 14 Nov 2009 19:17:30 +0000 (19:17 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
files/etc/puppet/lib/puppet/parser/functions/ldapinfo.rb

index c65351f3596064b76bb768c8be0133645d7b68c6..3564de329ee99d31af9f762988bc9291c631edb9 100644 (file)
@@ -19,8 +19,8 @@ module Puppet::Parser::Functions
         unless attributes.include?("*")
           next if attributes.any?{ |a|  not x[a] or x[a].empty? }
         end
-        results[x['hostname']] = []
-        results[x['hostname']] << x
+        results[x['hostname'][0]] = []
+        results[x['hostname'][0]] << x
       end
     rescue LDAP::ResultError
       raise Puppet::ParseError, "LDAP error"