inkblot/puppet-bind

Feature Request: Template as an option in addition to db.empty for zone.

Opened this issue · 3 comments

Would it be possible to get functionality added to use a template here rather than a static file: https://github.com/inkblot/puppet-bind/blob/master/manifests/zone.pp#L111

I'm trying to use your module to setup a split-dns for both private & public websites we are hosting and I'd like to try it with a template instead so that I don't have to maintain multiple zone records.

It would be possible, but it would also be possible to do this using resource_record resources in a puppet define. This is how I do split-dns with public and private zones. I have a site::dns class which declares the views, zones, acls, and keys. This class also defines the DNS resource records which are different between the public and private zones, and includes two declarations of a site::dns::common define. In this define are all of the records (defined using resource_record) that are the same between the public and private zones, and the define is parameterized to place the records in one zone at a time, but used twice in the class, once for each zone.

I'm another looking for templates in the bind::zone class in order to bootstrap the zone into existence. We have some fairly dynamic internal zone creation so allowing us to template this and drop in new zones based on hiera/PuppetDB definitions would make our lives a lot easier. I'll put together a pull request for you in the next day or two. Should be pretty easy.

Sorry for the delay. Pull request sent for this feature. A very simple implementation that just preferences the file content rather than a source reference if not empty.