Lets say I have
# hash
some_application::users:
some_user:
username: 'some_username'
password: 'some_password'
another_user:
username: 'another_username'
password: 'another_password'
And I want to reuse these variables in Hiera:
# hash
another_application::users:
some_user:
username: "%{hiera('some_application::users')['some_user']['username']}"
another_user:
username: "%{hiera('some_application::users')['another_user']['username']}"
This kind of definition work from console:
puppet apply -e "notice(hiera('some_application::users')['some_user']['username'])"
But not from Hiera. What is the correct syntax to reuse variable from Hiera hash?
↧