vendored/puppet/lib/puppet/functions/hiera_include.rb in bolt-0.17.1 vs vendored/puppet/lib/puppet/functions/hiera_include.rb in bolt-0.17.2
- old
+ new
@@ -9,14 +9,14 @@
# * `lookup_options` stored in the data
# * lookup across global, environment, and module layers
#
# @example Using `lookup` and `include` instead of of the deprecated `hiera_include`
#
-# ~~~puppet
+# ```puppet
# # In site.pp, outside of any node definitions and below any top-scope variables:
# lookup('classes', Array[String], 'unique').include
-# ~~~
+# ```
#
# The `hiera_include` function requires:
#
# - A string key name to use for classes.
# - A call to this function (i.e. `hiera_include('classes')`) in your environment's
@@ -41,11 +41,11 @@
# [array merge lookup](https://docs.puppetlabs.com/hiera/latest/lookup_types.html#array-merge)
# to retrieve the `classes` array, so every node gets every class from the hierarchy.
#
# @example Using `hiera_include`
#
-# ~~~ yaml
+# ```yaml
# # Assuming hiera.yaml
# # :hierarchy:
# # - web01.example.com
# # - common
#
@@ -54,34 +54,34 @@
# # - apache::mod::php
#
# # Assuming common.yaml:
# # classes:
# # - apache
-# ~~~
+# ```
#
-# ~~~ puppet
+# ```puppet
# # In site.pp, outside of any node definitions and below any top-scope variables:
# hiera_include('classes', undef)
#
# # Puppet assigns the apache and apache::mod::php classes to the web01.example.com node.
-# ~~~
+# ```
#
# You can optionally generate the default value with a
# [lambda](https://docs.puppetlabs.com/puppet/latest/reference/lang_lambdas.html) that
# takes one parameter.
#
# @example Using `hiera_include` with a lambda
#
-# ~~~ puppet
+# ```puppet
# # Assuming the same Hiera data as the previous example:
#
# # In site.pp, outside of any node definitions and below any top-scope variables:
# hiera_include('classes') | $key | {"Key \'${key}\' not found" }
#
# # Puppet assigns the apache and apache::mod::php classes to the web01.example.com node.
# # If hiera_include couldn't match its key, it would return the lambda result,
# # "Key 'classes' not found".
-# ~~~
+# ```
#
# See
# [the 'Using the lookup function' documentation](https://docs.puppet.com/puppet/latest/hiera_use_function.html) for how to perform lookup of data.
# Also see
# [the 'Using the deprecated hiera functions' documentation](https://docs.puppet.com/puppet/latest/hiera_use_hiera_functions.html)