Ability to drop-in bind::zone from other modules
Right now, it doesn't seem possible to have one puppet site module configure a bind server, and have another site module drop in a bind::zone conditionally (in this case I'm looking at a consul. forwarder only on hosts running consul) because bind::view has to be explicitly and statically configured with the list of zones within to serve. I've been trying to think of a way to solve this, and the best thing I can come up with for now with minimal backwards compatibility break is:
- Switch view templating to use something like
concat, with all the existing content dropped in by a single fragment - Add a new
bind::view_zonedefine to map a zone into a view like:bind::view_zone { 'consul': zones => ['consul.'], views => ['local'], } - Have the
bind::view_zonetype drop a fragment with an additional include line for each zone/view combination.
If I were to do this work and raise a PR for the changes, would you be willing to accept it?
edit: I see this module is already using concat, and writing all views to a single views.conf file. That makes it significantly harder to achieve this.