diff --git a/manifests/server/conf.pp b/manifests/server/conf.pp index 7944be2ee..524e3b1b8 100644 --- a/manifests/server/conf.pp +++ b/manifests/server/conf.pp @@ -62,6 +62,8 @@ # and the value is an array of config lines. Default: empty # $includes: # Array of absolute paths to named.conf include files. Default: empty +# $disable_empty_zone: +# Array of zones for which empty zone responses are disabled. Default: empty # # Sample Usage : # bind::server::conf { '/etc/named.conf': @@ -120,6 +122,7 @@ $zones = {}, $keys = {}, $includes = [], + $disable_empty_zone = [], $views = {}, ) { diff --git a/templates/named.conf.erb b/templates/named.conf.erb index 39cd72b8c..36ce8b7e8 100644 --- a/templates/named.conf.erb +++ b/templates/named.conf.erb @@ -99,6 +99,12 @@ options { /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; + +<% if !@disable_empty_zone.empty? -%> +<% @disable_empty_zone.each do |emptyzone| -%> + disable-empty-zone "<%= emptyzone %>"; +<% end -%> +<% end -%> }; logging {