Sha256: 3dfc84b082633792bb29adcaa1adda02219a673ee1c95763429ab3cb17bc34e8
Contents?: true
Size: 979 Bytes
Versions: 1
Compression:
Stored size: 979 Bytes
Contents
# # render.rb # # Returns the string-ified form of a given value or set of values. # module Puppet::Parser::Functions newfunction(:render, :type => :rvalue, :doc => <<-EOS This function returns the string-ified form of a given value. EOS ) do |args| value = nil CORL.run do raise(Puppet::ParseError, "render(): Must have a template class name and an optional source value specified; " + "given (#{args.size} for 2)") if args.size < 1 provider = args[0] data = ( args.size > 1 ? args[1] : {} ) options = ( args.size > 2 ? args[2] : {} ) config = CORL::Config.init_flat(options, [ :data, :render ], { :provisioner => :puppetnode, :hiera_scope => self, :puppet_scope => self, :search => 'core::default', :force => true, :merge => true }) value = CORL.template(config, provider).render(data) end return value end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
corl-0.4.3 | lib/puppet/parser/functions/render.rb |