diff --git a/manifests/backend/bind9.pp b/manifests/backend/bind9.pp index 34e2209f..6319eb57 100644 --- a/manifests/backend/bind9.pp +++ b/manifests/backend/bind9.pp @@ -45,6 +45,10 @@ # (Optional) TCP Port to connect to designate-mdns service. # Defaults to 5354. # +# [*clean_zonefile*] +# (Optional) Removes zone files when a zone is deleted. +# Defaults to false +# # [*also_notifies*] # (Optional) Array of hosts for which designate-mdns will send DNS notify # packets to. @@ -72,6 +76,7 @@ class designate::backend::bind9 ( $dns_port = 53, Array[String[1], 1] $mdns_hosts = ['127.0.0.1'], $mdns_port = 5354, + Boolean $clean_zonefile = false, Array[String[1]] $also_notifies = [], # DEPRECATED PARAMETERS Boolean $configure_bind = true, diff --git a/releasenotes/notes/bind9-clean_zonefile-811c1b264ea08143.yaml b/releasenotes/notes/bind9-clean_zonefile-811c1b264ea08143.yaml new file mode 100644 index 00000000..51ce6dd7 --- /dev/null +++ b/releasenotes/notes/bind9-clean_zonefile-811c1b264ea08143.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``designate::backend::clean_zonefile`` parameter has been added. diff --git a/templates/bind9-pools.yaml.erb b/templates/bind9-pools.yaml.erb index 08758bf2..ab0eb04a 100644 --- a/templates/bind9-pools.yaml.erb +++ b/templates/bind9-pools.yaml.erb @@ -33,6 +33,9 @@ rndc_port: <%= @rndc_port %> rndc_config_file: <%= @rndc_config_file %> rndc_key_file: <%= @rndc_key_file %> +<% if @clean_zonefile -%> + clean_zonefile: true +<% end -%> <% end -%> <% if !(@also_notifies.empty?) -%> also_notifies: