Puppet Function: stdlib::to_yaml
- Defined in:
-
vendor_modules/stdlib/lib/puppet/functions/stdlib/to_yaml.rb
- Function type:
- Ruby 4.x API
Summary
Convert a data structure and output it as YAML
Overview
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'vendor_modules/stdlib/lib/puppet/functions/stdlib/to_yaml.rb', line 6
Puppet::Functions.create_function(:'stdlib::to_yaml') do
dispatch :to_yaml do
param 'Any', :data
optional_param 'Hash', :options
end
def to_yaml(data, options = {})
call_function('stdlib::rewrap_sensitive_data', data) do |unwrapped_data|
unwrapped_data.to_yaml(options.transform_keys(&:to_sym))
end
end
end
|