inkblot / puppet-bind

18 stars 82 forks source link

Add zone includes #27

Closed smithtrevor closed 9 years ago

smithtrevor commented 9 years ago

Add an include_zones.conf file that is included in the main named.conf that contains an include for each of the zone files created by the zone defined type. This ensures that when a zone is added through the defined type that it will become active on the server. This includes an 'ensure' parameter that can be set to absent to make sure the zone file and the include is removed.

inkblot commented 9 years ago

This will break views when they are used to implement split-horizon, won't it?

smithtrevor commented 9 years ago

You are correct, it would. What would probably work would be to set a boolean parameter in init.pp to enable/disable views. If true then the named.conf template should add the include statement for the for the views.conf and not have the statement for the include_zones.conf, vice versa if set to false. I'll also add logic to the zone type that won't add the include line for the zone to the include_zones.conf if set to true in order to keep things clean.

This should work since if you're using views then all zones need to be in a view. The main thing I'm trying to address is that currently if you're not using views then when you create a zone via the defined type they aren't added to the config anywhere.

if you're ok with the above then let me know and I'll make the changes.

thanks!

inkblot commented 9 years ago

That sounds reasonable. I look forward to seeing it.

smithtrevor commented 9 years ago

closing PR. will resubmit when I have something ready rather than leaving it open. thanks