projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git]
/
3rdparty
/
modules
/
stdlib
/
lib
/
puppet
/
parser
/
functions
/
loadyaml.rb
diff --git
a/3rdparty/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb
b/3rdparty/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb
index
a49ae2c
..
f84f530
100644
(file)
--- a/
3rdparty/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb
+++ b/
3rdparty/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb
@@
-3,14
+3,18
@@
#
module Puppet::Parser::Functions
newfunction(:loadyaml, :type => :rvalue, :arity => -2, :doc => <<-'DOC') do |args|
#
module Puppet::Parser::Functions
newfunction(:loadyaml, :type => :rvalue, :arity => -2, :doc => <<-'DOC') do |args|
- Load a YAML file containing an array, string, or hash, and return the data
- in the corresponding native data type.
+ @summary
+ Load a YAML file containing an array, string, or hash, and return the data
+ in the corresponding native data type.
+
The first parameter can be a file path or a URL.
The second parameter is the default value. It will be returned if the file
was not found or could not be parsed.
The first parameter can be a file path or a URL.
The second parameter is the default value. It will be returned if the file
was not found or could not be parsed.
- For example:
+ @return [Array|String|Hash]
+ The data stored in the YAML file, the type depending on the type of data that was stored.
+ @example Example Usage:
$myhash = loadyaml('/etc/puppet/data/myhash.yaml')
$myhash = loadyaml('https://example.local/my_hash.yaml')
$myhash = loadyaml('https://username:password@example.local/my_hash.yaml')
$myhash = loadyaml('/etc/puppet/data/myhash.yaml')
$myhash = loadyaml('https://example.local/my_hash.yaml')
$myhash = loadyaml('https://username:password@example.local/my_hash.yaml')