Type: New Feature
Affects Version/s: None
Fix Version/s: PUP 4.0.0
Sprint:Platform Server 2014-11-26, Platform Server 2014-12-17, Language 2015-01-21, Language 2015-02-04
A mechanism is wanted that allows support for hiera based data in modules such that:
- A module author that wants this feature makes the module depend on the
hiera - 'data-in-modules' module.
- The use of 'hiera-data-in-modules' does not monopolize how data/lookup and injection is performed at a user site
- The solution does not make the now available 'hiera-data-in-modules' the only possible implementation.
The current implementation of 'hiera-data-in-modules' performs monkey patching to wire the support for a new type of hiera backend. This was required to make the logic kick in early enough.
The idea is to use the binder/injector since it kicks in early. Two things can be bound:
- HieraConfigManipulator - allows multiple manipulators to be bound, each is called with a hash containing the hiera.yaml config and returns a (possibly) manipulated config file.
- HiraConfigOrganizer - is responsible for determining the order in which the HieraConfigManipulators are called.
Initially there will be an implementation of the HieraConfigOrganizer that simply calls the manipulators in an undefined order (this because there is currently only one known implementation of hiera manipulator). If a defined order is wanted, it should be possible to bind an array with names of the manipulators to define the order in which they are called.
This design has been discussed with R.I.Pienaar
Idea in a bit more detail:
The module that provides a manipulator needs to make a binding - i.e. roughly do this:
The code above is just a rough idea of how this is done, details to be worked out while implementing.
The idea is to make this available in 3.6.0 when using - -
parser future and that it becomes standard in Puppet 4.