Hi,
I'm looking for a way to tell the puppet server some business logic about a group of nodes before the first puppet run. This business logic affects the parameters of the profiles and the classes. It's an information telling who is the owner of a node, and it implies many configuration changes. There is no way to guess this information from the base facts.
For now, to achieve this, we put manually a fact in `/etc/puppetlabs/facter/facts.d/owner.yaml` containing the fact "owner" with some value This means that the node is property of an "owner" and will affect the catalog in many ways, defined in a hierarchy (`hiera/labo/{%facts.owner}..yaml`)
It works but with the precondition that someone manually set this file with the right value. And if not, the profiles would be realized by the puppet server with wrong parameters.
One solution is to rewrite the profiles for each owner, but this would duplicate the code a lot and I'm trying to avoid this. The same drawback happens if I set the configurations in hiera at a node level (`hiera/nodes/{%facts.fqdn}.yaml`).
Is there another way to set this business logic before a first puppet run ?
↧