Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Bare with me... I want difficult stuff from Hiera

Is it possible with Hiera to do different types of lookup? Do a 'hiera' lookup if a match is found in "%{environment}/%{clientcert}/sources", but do 'hiera_hash' lookup if a match isn't found there? For example... if my hiera.yaml looks like this:

:hierarchy:
  - "%{environment}/%{clientcert}/sources"
  - "%{environment}/%{domain}/sources"
  - "%{environment}/all/sources"

I want to use the hiera lookup if it finds something in "%{environment}/%{clientcert}/sources" and I want to use hiera_hash lookup if it doesn't.