11---
22layout : default
3- built_from_commit : f03f25066a56ff61ba828f787fa32600f7d1f169
3+ built_from_commit : 2959aff838fdb13a35943fa8a83581fc3c1f0707
44title : Built-in function reference
55canonical : " /puppet/latest/function.html"
66toc_levels : 2
77toc : columns
88---
99
10- > ** NOTE:** This page was generated from the Puppet source code on 2020-05-26 11:40:10 -0700
10+ > ** NOTE:** This page was generated from the Puppet source code on 2020-06-30 08:58:23 +0100
1111
1212This page is a list of Puppet's built-in functions, with descriptions of what they do and how to use them.
1313
@@ -76,6 +76,7 @@ Logs a message on the server at level `alert`.
7676
7777#### Parameters
7878
79+
7980* ` *values ` --- The values to log.
8081
8182Return type(s): ` Undef ` .
@@ -799,6 +800,7 @@ Logs a message on the server at level `crit`.
799800
800801#### Parameters
801802
803+
802804* ` *values ` --- The values to log.
803805
804806Return type(s): ` Undef ` .
@@ -812,6 +814,7 @@ Logs a message on the server at level `debug`.
812814
813815#### Parameters
814816
817+
815818* ` *values ` --- The values to log.
816819
817820Return type(s): ` Undef ` .
@@ -1120,6 +1123,7 @@ Logs a message on the server at level `emerg`.
11201123
11211124#### Parameters
11221125
1126+
11231127* ` *values ` --- The values to log.
11241128
11251129Return type(s): ` Undef ` .
@@ -1214,6 +1218,7 @@ Logs a message on the server at level `err`.
12141218
12151219#### Parameters
12161220
1221+
12171222* ` *values ` --- The values to log.
12181223
12191224Return type(s): ` Undef ` .
@@ -1289,6 +1294,7 @@ as an array in the form `[key, value]` and returns a hash containing the results
12891294$data = { "orange" => 0, "blueberry" => 1, "raspberry" => 2 }
12901295$filtered_data = $data.filter |$items| { $items[0] =~ /berry$/ }
12911296# $filtered_data = {blueberry => 1, raspberry => 2}
1297+ ```
12921298
12931299When the first argument is an array and the lambda has two parameters, Puppet passes the
12941300array's indexes (enumerated from 0) in the first parameter and its values in the second
@@ -1680,10 +1686,12 @@ Signature 1
16801686
16811687#### Parameters
16821688
1689+
16831690* ` collection ` --- A collection of things to group.
16841691
16851692Return type(s): ` Hash ` .
16861693
1694+
16871695#### Examples
16881696
16891697Group array of strings by length, results in e.g. { 1 => [ a, b] , 2 => [ ab] }
@@ -2196,6 +2204,7 @@ Logs a message on the server at level `info`.
21962204
21972205#### Parameters
21982206
2207+
21992208* ` *values ` --- The values to log.
22002209
22012210Return type(s): ` Undef ` .
@@ -3883,6 +3892,7 @@ Logs a message on the server at level `notice`.
38833892
38843893#### Parameters
38853894
3895+
38863896* ` *values ` --- The values to log.
38873897
38883898Return type(s): ` Undef ` .
@@ -3899,10 +3909,12 @@ Signature 1
38993909
39003910#### Parameters
39013911
3912+
39023913* ` collection ` --- A collection of things to partition.
39033914
39043915Return type(s): ` Tuple[Array, Array] ` .
39053916
3917+
39063918#### Examples
39073919
39083920Partition array of empty strings, results in e.g. [[ ''] , [ b, c]]
@@ -4080,6 +4092,7 @@ Signature 1
40804092
40814093#### Parameters
40824094
4095+
40834096* ` target ` --- The string or array of strings to operate on. If an array, the replacement will be
40844097performed on each of the elements in the array, and the return value will be an array.
40854098
@@ -4106,6 +4119,7 @@ precompiled regexp). A single-character string with the following values:
41064119
41074120Return type(s): ` Array[String] ` , ` String ` . The result of the substitution. Result type is the same as for the target parameter.
41084121
4122+
41094123#### Examples
41104124
41114125Get the third octet from the node's IP address:
@@ -4121,6 +4135,7 @@ Signature 2
41214135
41224136#### Parameters
41234137
4138+
41244139* ` target ` --- The string or array of strings to operate on. If an array, the replacement will be
41254140performed on each of the elements in the array, and the return value will be an array.
41264141
@@ -4147,6 +4162,7 @@ precompiled regexp). A single-character string with the following values:
41474162
41484163Return type(s): ` Array[String] ` , ` String ` . The result of the substitution. Result type is the same as for the target parameter.
41494164
4165+
41504166#### Examples
41514167
41524168Put angle brackets around each octet in the node's IP address:
@@ -5336,6 +5352,7 @@ Logs a message on the server at level `warning`.
53365352
53375353#### Parameters
53385354
5355+
53395356* ` *values ` --- The values to log.
53405357
53415358Return type(s): ` Undef ` .
@@ -5372,4 +5389,4 @@ how to use this function.
53725389
53735390` yaml_data(Struct[{path=>String[1]}] $options, Puppet::LookupContext $context) `
53745391
5375- > ** NOTE:** This page was generated from the Puppet source code on 2020-05-26 11:40:10 -0700
5392+ > ** NOTE:** This page was generated from the Puppet source code on 2020-06-30 08:58:23 +0100
0 commit comments