diff --git a/lib/puppet/parser/functions/ldapquery.rb b/lib/puppet/parser/functions/ldapquery.rb index d21761e..c33efb1 100644 --- a/lib/puppet/parser/functions/ldapquery.rb +++ b/lib/puppet/parser/functions/ldapquery.rb @@ -15,5 +15,8 @@ Puppet::Parser::Functions.newfunction(:ldapquery, filter, attributes, base = args + attributes ||= [] + base ||= Puppet[:ldapbase] + return PuppetX::LDAPquery.new(filter, attributes, base).results end