I have been using variable interpolation within my Hiera data files for sometime.
For instance I have Citrix NetScaler LB rules defined as such:
apache:
name: "%{::cluster}-apache"
ensure: 'present'
service_type: 'HTTP'
state: true
lb_method: 'LEASTCONNECTION'
And based on the cluster the machine is in (cluster is a parameter set by my ENC) it creates the rule accordingly.
However I know have a need to interpolate variables that might be be arrays or hashes. Is there a way I can interpolate a hash key, value within a hiera data file from a variable in the current scope?
I know within hiera I can reference other keys using hash and look-up based on a key, but this data isn't another key within the data file, it is a variable set by my ENC available in the current scope (just like cluster was).
Thanks