1 module Puppet::Parser::Functions
2 newfunction(:allnodeinfo, :type => :rvalue) do |args|
6 allhosts = function_ldapinfo('*', required+optional )
8 allhosts.each_pair do |hostname, host|
9 # If a returned value doesn't have all the attributes we're searching for, skip
10 # We'll skip if the array is empty, but we also seem to get back a nil object for empty attributes sometimes
11 next if required.any?{ |a| not host[a] or host[a].empty? }
20 # vim:set shiftwidth=2: