Allow custom variables to be queried from a puppet function
The new custom variables and multiple values resolved should be available via a puppet function (similar to extlookup).
Example usage in puppet code (with function name -> "foremanextvar"):
foremanextvar (<variable>, <default_value>, <comment>, <paramfile_with_extra_options> )
This way we could achieve the following:
- manage the variables in foreman
- query them from puppetcode
- Add metadata (for ex. "comment")
- have forward and backwards compatibility with core puppet functions (using the "default_value" field).
Example (with extlookup fallback compatibility and comment):
$ntpd_options = foremanextvar (ntpd_options, extlookup (ntpd_options), "oracle needs -o in RAC environments" )
Note: This implementation would also require a way to enable/disable the params from adding to the enc yaml (something to avoid puppet errors complaining the variable is already defined.)
fixes #1029 - allows smart variables to be resolved via http get request.
this would allow to an external query to resolve a variable value to a given host.