From e3b74c6a36bed7f9e1646465607a27b996a14761 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 17 Nov 2023 18:07:48 +0900 Subject: [PATCH] bind9: Add support for clean_zonefile option The option was added some cycles ago[1]. [1] 7618d073c9ee81cdf835f603e9030f6dd09b6d75 Change-Id: I94f74ca0e2d8d5bdad5787f4b2bcc29de26cadf1 --- manifests/backend/bind9.pp | 5 +++++ .../notes/bind9-clean_zonefile-811c1b264ea08143.yaml | 4 ++++ templates/bind9-pools.yaml.erb | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 releasenotes/notes/bind9-clean_zonefile-811c1b264ea08143.yaml 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: