Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Via the docs, you may be looking for the 'alias' command.

https://docs.puppet.com/hiera/3.2/variables.html#the-alias-lookup-function

The alias() lookup function

The alias() function allows you to make one key in Hiera data act as an alias for another. This is different than just interpolating another key, since that results in a string.

original:
  - 'a'
  - 'b'
aliased: "%{alias('original')}"

This returns an array with ['a', 'b'] for both the original and the aliased keys.

The data entry that uses the alias function cannot combine it with post/prefix text — that is, aliased: "%{alias('original')} -c" would be an illegal value.