Puppet Function: ordered_yaml

Defined in:
puppet/modules/wmflib/lib/puppet/parser/functions/ordered_yaml.rb
Function type:
Ruby 3.x API

Overview

ordered_yaml()Any

Returns:

  • (Any)


46
47
48
# File 'puppet/modules/wmflib/lib/puppet/parser/functions/ordered_yaml.rb', line 46

newfunction(:ordered_yaml, :type => :rvalue, :arity => 1) do |args|
  dedent_string(YAML.dump(sort_keys_recursive(args.first)).gsub(/^---.*?\n/, '')) << "\n"
end