Feature #14945
closedAdd support for configuring Hiera
Description
It would be useful for installers to be able to use Puppet data binding, i.e. the ability to specify parameter values for classes not directly included by Kafo. An example is ticket #14789, where a class indirectly included has a default parameter that we'd ideally like to disable without explicitly including the class (not always possible, and may require some ugly refactoring).
The standard Puppet implementation is Hiera, which can by default read parameters out of config files - usually YAML or JSON, in a very similar format to Kafo's own answer file.
I'd like to be able to at least set a Hiera config file for the Puppet run (by passing --hiera_config), probably set from the scenario config file.
It may be easy to go a step further and replace kafo_configure::yaml_to_class with a Hiera-based implementation by default, which would require Puppet 3 or higher. Kafo could have a very simple default config file, and could generate a Hiera-style YAML file from its own answers file with a small transformation, e.g.
:hierarchy: - kafo_answers
and generate kafo.yaml:
foreman::myparam: example
If installer developers could override the Hiera config, they could add their own entries to the hierarchy, e.g.
:hierarchy: - kafo_answers - %{::osfamily} - installer_defaults