Skip to content

Instantly share code, notes, and snippets.

@binford2k
Created August 15, 2013 16:44
Show Gist options
  • Save binford2k/6242381 to your computer and use it in GitHub Desktop.
Save binford2k/6242381 to your computer and use it in GitHub Desktop.
# this should go in <module>/lib/puppet/parser/functions/filter_hash.rb
Puppet::Parser::Functions.newfunction(:filter_hash) do |args|
rv = {}
args[0].collect do |key, item|
rv[key] = { 'hostname' => item['hostname'], 'path' => item['path'] }
end
return rv
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment