From fe0a845f6587a2d381bbec98078a4f0e5112b089 Mon Sep 17 00:00:00 2001 From: Tilo Klausing Date: Mon, 12 Jan 2015 14:41:56 +0100 Subject: [PATCH] statistics channel can optinally be enabled --- manifests/init.pp | 1 + templates/named.conf.erb | 6 ++++++ 2 files changed, 7 insertions(+) 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 != '' -%>