refactor: Simplify statistics-channels template

This commit is contained in:
Daniel Akulenok
2024-05-14 14:29:10 +02:00
committed by Daniel Akulenok
parent 98f33fb989
commit 08fb247110
2 changed files with 2 additions and 4 deletions

View File

@@ -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 %}