I am trying to use an ENC-set top-scope variable in my Hiera hierarchy. However it doesn't seem to be working.
Here is what is returned by my ENC script (it is the foreman ENC script) for a node:
parameters:
san_rafael-spacewalk: mai01-sprxy-02v
puppet_ca: mai01-pmstr-02v
group: engineering
spacewalk_type: site
san_rafael_dmz-spacewalk: mai01-sprxy-01v
hostgroup: base/production/engineering/quality_assurance/locked
san_rafael_dmz-proxy: mai01-dprxy-01v
spacewalk_host: mai02-swalk-01v
santa_rosa_dmz-spacewalk: mai02-sprxy-01v
root_pw: $1$ubWDPsM+$lzyZdN91QCk6dZAhMXBlM/
foreman_env: production
santa_rosa_dmz-proxy: mai02-dprxy-01v
activation_key: 5-839beb8c567b98c0720db37f19ecb64d
puppetmaster: mai01-pmstr-02v
environment: production
classes:
security::access:
security::users:
Then in my hiera.yaml file I have:
---
:backend:
- yaml
:hierarchy:
- %{::clientcert}
- %{::group}
- %{::dc_location}_%{::is_dmz}
- %{::operatingsystem}
- common
:yaml:
:datadir: '/var/lib/hiera'
Then within /var/lib/hiera I added an engineering.yaml file. But it doesn't seem to be referenced when Hiera goes through the hierarchy. One way I verified this (to ensure something else funky wasn't going on) is that i purposely put an error in the engineering.yaml file and Puppet runs without issue.
Is it not possible to use a variable returned from ENC?
Thanks