projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Idiot. LDAP returns an array for all attributes, index into it for hash keys
[mirror/dsa-puppet.git]
/
files
/
etc
/
puppet
/
lib
/
puppet
/
parser
/
functions
/
ldapinfo.rb
diff --git
a/files/etc/puppet/lib/puppet/parser/functions/ldapinfo.rb
b/files/etc/puppet/lib/puppet/parser/functions/ldapinfo.rb
index
c65351f
..
3564de3
100644
(file)
--- a/
files/etc/puppet/lib/puppet/parser/functions/ldapinfo.rb
+++ b/
files/etc/puppet/lib/puppet/parser/functions/ldapinfo.rb
@@
-19,8
+19,8
@@
module Puppet::Parser::Functions
unless attributes.include?("*")
next if attributes.any?{ |a| not x[a] or x[a].empty? }
end
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"
end
rescue LDAP::ResultError
raise Puppet::ParseError, "LDAP error"