I have a puppet setup where each node manifest is named something like
/^web-\d+\.example\.com$/
We do this so we can spin up new servers for additional capacity and give each one a unique certname
using the timestamp from when it was launched.
This is causing problems with the Hiera part of our Puppet setup since we can't do
:hierarchy:
- "nodes/%{::trusted.certname}"
- common
since we can't predict what all the certname
s will be. Right now we're just specifying each node type in the hierarchy, but we'd like to be able to add new node types without editing our hiera.yaml
each time.
Is it possible to have some sort of dynamic lookup in our hierarchy that will allow us to have dynamically generated certnames without specifying every node type?