Puppet Function: ordered_yaml

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

Overview

ordered_yaml()Any

Returns:

  • (Any)


53
54
55
# File 'modules/wmflib/lib/puppet/parser/functions/ordered_yaml.rb', line 53

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