On 2013-26-10 24:47, Nick Fagerlund wrote:
Hi all! Docs team here.
It looks like recursive Hiera data lookups were merged via pull request
152. However, we have no preliminary documentation for how this works
and what the limitations are -- across the multiple discussion threads
and multiple outdated implementations, it's looking like it would take a
lot of detective work to figure out the final behavior.
In order to allow release of 1.3.0, the docs team needs a brief write-up
of the final behavior and its implications. Jesse Hathaway, Adrien, and
Henrik -- would one or several of you be able to write something up for
us? Or can you give a pointer to something final and complete that
already exists within the various threads?
The support is based on calling lookup functions in the interpolation.
Two such functions are supported:
* hiera('hiera_key')
* scope('variable_name')
They are used in hiera interpolation like this:
mykey: "I include %{hiera('otherkey')}"
otherkey: "the other key"
When looking up the key 'mykey', the result is "I include the other key".
The key argument in the function must be surrounded by ' or ".
The scope function is basically the same as the regular variable
interpolation, but it performs an extra lookup in the given 'extra data'
that can be supplied to hiera when doing lookup if the lookup in
the regular scope did not produce a value. (Someone else may have a
better explanation / examples of usage).
The implementation checks for endless recursion and issues an error if
an attempt is made to interpolate an already interpolated key.
Note that it is sensitive wrt. whitespace, users should not have any
whitepsace in the interpolation function. (e.g. this will not work
"I include %{ hiera( 'otherkey' ) }")
Hope that answers the questions.
Regards
- henrik
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.