From 0809bc7e914efe1eec1c4ac5392b37c9683b3f9d Mon Sep 17 00:00:00 2001 From: Daniel Akulenok Date: Tue, 14 May 2024 14:29:10 +0200 Subject: [PATCH] statistics_channels --- templates/named.conf.generator.j2 | 2 +- templates/named.conf.statistics-channels.j2 | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/templates/named.conf.generator.j2 b/templates/named.conf.generator.j2 index ef48120..e671892 100644 --- a/templates/named.conf.generator.j2 +++ b/templates/named.conf.generator.j2 @@ -45,7 +45,7 @@ options { {% include 'named.conf.server.j2' %} {% endif %} {% if item.statistics_channels is defined and item.statistics_channels %} -{% from 'named.conf.statistics-channels.j2' import statistics_channels with context %} +{% include 'named.conf.statistics-channels.j2' %} {{ statistics_channels(item.statistics_channels) }} {% endif %} {% if item.tls is defined and item.tls %} diff --git a/templates/named.conf.statistics-channels.j2 b/templates/named.conf.statistics-channels.j2 index 088c044..a52d26c 100644 --- a/templates/named.conf.statistics-channels.j2 +++ b/templates/named.conf.statistics-channels.j2 @@ -1,10 +1,8 @@ -{% macro statistics_channels(statistics_channels) %} statistics-channels { {% filter indent(bind9_config_indent, true) %} -{% for channel in statistics_channels if statistics_channels is iterable %} +{% for channel in item.statistics_channels if item.statistics_channels is iterable %} inet {{ channel.address | string }} {{- (' port ' + channel.port | string) if channel.port is defined and channel.port -}} {{- (' allow {\n' + functions.simple_item_list(channel.allow) + '};\n') if channel.allow is defined and channel.allow -}} {% endfor %} {% endfilter %}}; -{% endmacro %} \ No newline at end of file