Sha256: dd740fe8431354f7b5f69962a673faa7ed3178c485ec3b74f3b6074a62ff4e5f

Contents?: true

Size: 547 Bytes

Versions: 10

Compression:

Stored size: 547 Bytes

Contents

# Find default values for variables specified as args
#
module Puppet::Parser::Functions
  newfunction(:dump_values) do |args|
    options = []
    options<< false if Puppet::PUPPETVERSION.start_with?('2.6')
    data = args.map do |arg|
      found_value = lookupvar(arg, *options)
      [arg, found_value.nil? ? arg : found_value]
    end
    data = Hash[data]
    dump_dir = YAML.load_file(lookupvar('kafo_config_file'))[:default_values_dir]
    File.open("#{dump_dir}/default_values.yaml", 'w') { |file| file.write(YAML.dump(data)) }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kafo-0.5.1 modules/kafo_configure/lib/puppet/parser/functions/dump_values.rb
kafo-0.5.0 modules/kafo_configure/lib/puppet/parser/functions/dump_values.rb
kafo-0.4.0 modules/kafo_configure/lib/puppet/parser/functions/dump_values.rb
kafo-0.3.16 modules/kafo_configure/lib/puppet/parser/functions/dump_values.rb
kafo-0.3.15 modules/kafo_configure/lib/puppet/parser/functions/dump_values.rb
kafo-0.3.14 modules/kafo_configure/lib/puppet/parser/functions/dump_values.rb
kafo-0.3.13 modules/kafo_configure/lib/puppet/parser/functions/dump_values.rb
kafo-0.3.12 modules/kafo_configure/lib/puppet/parser/functions/dump_values.rb
kafo-0.3.11 modules/kafo_configure/lib/puppet/parser/functions/dump_values.rb
kafo-0.3.10 modules/kafo_configure/lib/puppet/parser/functions/dump_values.rb