Open tuxmea opened 1 year ago
Note: the above is just an example. It should be possible to execute any Puppet function, like upcase
, template
, keys
, profile::get_url
, ...
Maybe limit to custom functions only, omitting Puppet DSL functions.
There's a risk of recursion, like calling lookup()
.
There's a risk of recursion, like calling
lookup()
.
Risk of recursion is there at the moment, too when using lookup
or alias
.
I assume I saw some Ruby code which takes care on this.
A recursion guard is indeed implemented in hiera 5. I wrote a puppet language backend (available in my github.com/hlindberg/tahu module that interprets all data as puppet language "snippets". With it is possible to call any function from within hiera data, and it does recursion checks.
It should be possible to call puppet functions directly from Hiera. e.g.
Hiera should then return the epp parsed content.
How are we able to solve this? Which syntax would be possible or recommended?