diff --git a/manifests/backend/bind9.pp b/manifests/backend/bind9.pp index b41916af..48c12570 100644 --- a/manifests/backend/bind9.pp +++ b/manifests/backend/bind9.pp @@ -6,11 +6,11 @@ # # [*rndc_config_file*] # (Optional) Location of the rndc configuration file. -# Defaults to '/etc/rndc.conf' +# Defaults to undef # # [*rndc_key_file*] # (Optional) Location of the rndc key file. -# Defaults to '/etc/rndc.key' +# Defaults to undef # # [*rndc_port*] # (Optional) RNDC Port. @@ -67,10 +67,10 @@ # Defaults to undef # class designate::backend::bind9 ( - $rndc_config_file = '/etc/rndc.conf', - $rndc_key_file = '/etc/rndc.key', + $rndc_config_file = undef, + $rndc_key_file = undef, $rndc_controls = undef, - $rndc_port = 953, + $rndc_port = undef, Hash[Integer, String] $ns_records = {1 => 'ns1.example.org.'}, Array[String[1], 1] $nameservers = ['127.0.0.1'], Array[String[1], 1] $bind9_hosts = ['127.0.0.1'], diff --git a/releasenotes/notes/rndc-optional-303e6561b611d0d1.yaml b/releasenotes/notes/rndc-optional-303e6561b611d0d1.yaml new file mode 100644 index 00000000..6b74dbd7 --- /dev/null +++ b/releasenotes/notes/rndc-optional-303e6561b611d0d1.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + Now the ``rndc_config_file`` option and the ``rndc_key_file`` of BIND9 + backend are not set by default, to avoid unnecessarily require these + files. + Set the parameters of the ``desingate::backend::bind9`` class in case + the previous default values need to be used. diff --git a/templates/bind9-pools.yaml.erb b/templates/bind9-pools.yaml.erb index d38a3008..535b2b5e 100644 --- a/templates/bind9-pools.yaml.erb +++ b/templates/bind9-pools.yaml.erb @@ -37,9 +37,15 @@ host: <%= bind9_host %> port: <%= @dns_port.to_s %> rndc_host: <%= bind9_host %> +<% if !@rndc_port.nil? -%> rndc_port: <%= @rndc_port %> +<% end -%> +<% if !@rndc_config_file.nil? -%> rndc_config_file: <%= @rndc_config_file %> +<% end -%> +<% if !@rndc_key_file.nil? -%> rndc_key_file: <%= @rndc_key_file %> +<% end -%> <% if @clean_zonefile -%> clean_zonefile: true <% end -%>