Puppet Function: pacemaker_resource_parameters
- Defined in:
- lib/puppet/parser/functions/pacemaker_resource_parameters.rb
- Function type:
- Ruby 3.x API
Overview
Gather resource parameters and their values
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/puppet/parser/functions/pacemaker_resource_parameters.rb', line 2 newfunction( :pacemaker_resource_parameters, type: :rvalue, arity: -1, doc: <<-eof Gather resource parameters and their values eof ) do |args| parameters = {} args.flatten.each_slice(2) do |key, value| if value.nil? and key.is_a? Hash parameters.merge! key else next if key.nil? next if key == '' next if value.nil? next if value == '' next if value == :undef key = key.to_s parameters.store key, value end end parameters end |