document how to deal with Hiera variable interpolation

This commit is contained in:
2024-08-26 06:40:13 +02:00
parent e751ab0bc2
commit aa7d6233c3

View File

@@ -125,3 +125,12 @@ block: >
```
and place either the string or the block at the required place in your Hiera YAML.
# Hiera Variable Interpolation
Within Hiera also variable interpolation might be use to include other Hiera keys or facts, etc. into the values.
For details check out the [Puppet documentation](https://www.puppet.com/docs/puppet/7/hiera_merging.html#interpolation_functions)
As such an interpolation starts with `%{`, some key or file content (especially in Apache configuration) might be interpreted as variable interpolation and result in some part of the text disappear.
Or it might simply the puppet run with `Syntax error in string` if Puppet fails to parse what it considers an interpolation.
To escape a `%` you can write `%{literal('%')}` instead.