Hello
I am facing a small problem concerning the puppetization of
an highly available application.
Some code worst 1000 words:
myapp/common.pp:
@@apache::balancer { "myapp": }
apache.pp:
Apache::Balancer <<||>>
So long so good, until a second node also includes myapp/common.pp (the
two nodes run the same puppet code). Then puppet complains about
duplicate resource definition.
How would one solve that? I have been thinking about several options:
- Putting a "reference" boolean, which, if checked, would export the
resource to the PM. If unchecked then the resources would not be included.
- Putting a "reference node" in the apache class to only gather
balancers from certain nodes:
Apache::Balancer <<|tags=="myreferencenode"|>>
Any other ideas?
--
(o- Julien Pivotto
//\ Open-Source Consultant
V_/_ Inuits - https://www.inuits.eu