It's worth mentioning the fact that we should now be using the new lookup()
function in our Puppet DSL to retrieve Hiera values. The lookup()
function replaces the now deprecated set of Hiera functions:
hiera( )
hiera_hash( )
hiera_array( )
hiera_include( )
These each have an equivalent way of achieving the same result, so some fairly simple find-and-replace work on your Puppet DSL code base will soon have you moving away from the deprecated roadmap.
The lookup
function syntax has three specific styles of usage, as follows:
- With mandatory
<name>
and set of three optional arguments:<value type>
,<merge behavior>
and<default value>
in that given order and separated by commas. For example,lookup( <name>, [<value type>], [<merge behavior>], [<default value>] )
. - With optional
<name>
, and mandatory<options hash>
arguments. For example,lookup( [<name>], <options hash> )
. - With mandatory
<name...