X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=files%2Fetc%2Fpuppet%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fallnodeinfo.rb;h=47450d559e65f9ab7670febcdef26cf4b25114ed;hb=4380075e63bb72da4d77e57b9a650cb27f670c5d;hp=c86ce4f2660bf53cdf9708ef848534918e108bb0;hpb=d97f60d9c286ad58707ea15d937f342e874f5324;p=mirror%2Fdsa-puppet.git diff --git a/files/etc/puppet/lib/puppet/parser/functions/allnodeinfo.rb b/files/etc/puppet/lib/puppet/parser/functions/allnodeinfo.rb index c86ce4f26..47450d559 100644 --- a/files/etc/puppet/lib/puppet/parser/functions/allnodeinfo.rb +++ b/files/etc/puppet/lib/puppet/parser/functions/allnodeinfo.rb @@ -1,23 +1,6 @@ module Puppet::Parser::Functions newfunction(:allnodeinfo, :type => :rvalue) do |attributes| - - unless attributes.include?('hostname') - attributes << 'hostname' - end - - ldap = LDAP::Conn.new('db.debian.org') - - results = [] - filter = '(hostname=*)' - begin - ldap.search2('ou=hosts,dc=debian,dc=org', LDAP::LDAP_SCOPE_SUBTREE, filter, attrs=attributes, false, 0, 0, s_attr="hostname") do |x| - results << x - end - rescue LDAP::ResultError - rescue RuntimeError - ensure - ldap.unbind - end - return(results) + attributes.unshift('*') + return (function_ldapinfo(attributes)) end end