This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Puppet::Parser::Functions.newfunction(:local_scope, | |
:type => :rvalue, | |
:doc => <<-'EOS' | |
Generates the local scope as a hash. This allows you to use epp functions more | |
or less like erb templates by passing local scope as the parameters argument. | |
e.g., `content => epp('mymodname/template.epp', local_scope() )` | |
EOS | |
) do |args| | |
scope = self.to_hash | |
scope.reject! { |key,val| scope['facts'].include? key } |