Hiera 3.1.0

New features

deep_merge compatibility

Hiera backend opt-in for producing subkeys

This new feature is for implementers of Hiera backends.

Hiera backends can now opt-in to a new feature in the backend API that allows the backend to be responsible for producing values from subkeys. This is beneficial for backends that would otherwise have to produce a very large hash (for example, from a database or LDAP) only to be reduced to a single value and the returned data. Now the backend can instead opt-in to do the required slicing.

Bug fixes

Exit compilation when no backend found

If Hiera could not load a backend, it would skip it with a warning. This could have serious implications on the configuration, as the compilation will potentially act on data where a large portion of it is missing. Hiera will now produce an error and exit catalog compliation.

Empty interpolations

A regression where empty interpolations in Hiera strings caused garbage text to be inserted has been fixed. This regression was introduced in the 3.x Hiera release. Empty interpolations such as %{}, or %{::} now work, and the trick to get one verbatim interpolation into the string (for example, “%%{}{environment}” producing the string “%{environment}”) is now also again functional.

Infinite recursion when calling hiera() in hiera.yaml

Calling the hiera() interpolation method from within a hiera.yaml caused infinite recursion. This was fixed by making it an error to set hiera() method in interpolation in hiera.yaml. Also, the use of other interpolation methods in hiera.yaml will now yield a deprecation warning as they will not be allowed in Hiera 4.0.