diff --git a/manifests/init.pp b/manifests/init.pp index 26805a1..46b6eec 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -7,6 +7,7 @@ class bind ( $dnssec = undef, $version = undef, $rndc = undef, + $statistics_port = undef, ) { include params diff --git a/templates/named.conf.erb b/templates/named.conf.erb index 1b4c923..7033294 100644 --- a/templates/named.conf.erb +++ b/templates/named.conf.erb @@ -3,6 +3,12 @@ include "<%= @confdir %>/acls.conf"; include "<%= @confdir %>/keys.conf"; include "<%= @confdir %>/views.conf"; +<%- if @statistics_port -%> +statistics-channels { + inet 127.0.0.1 port <%= @statistics_port %> allow { 127.0.0.1; }; +}; +<%- end -%> + options { directory "<%= @cachedir %>"; <%- if @forwarders and @forwarders != '' -%>