diff --git a/defaults/main.yml b/defaults/main.yml index ae36420..571405b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -70,6 +70,15 @@ bind9_options: transfer_format: "many-answers" +bind9_statics: + enabled: true + channels: + - inet: "127.0.0.1" + port: "8053" + acls: + - "localhost" + + bind9_tsigkeys: [] # - name: "name" # algorithm: "algorithm" diff --git a/templates/etc/named/named.conf.options.j2 b/templates/etc/named/named.conf.options.j2 index 2474152..52f22dd 100644 --- a/templates/etc/named/named.conf.options.j2 +++ b/templates/etc/named/named.conf.options.j2 @@ -234,4 +234,16 @@ options { version none; zone-statistics yes; -}; \ No newline at end of file +}; + +{% if bind9_statics.enabled is defined and bind9_statics.enabled is true %} +statistics-channels { +{% for channel in bind9_statics.channels %} + inet {{ channel.inet }} port {{ channel.port }} allow { +{% for acl in channel.acls %} + {{ acl }}; +{% endfor %} + }; +{% endfor %} +}; +{% endif %} \ No newline at end of file