Demacro dlz

This commit is contained in:
Daniel Akulenok
2024-05-14 13:44:21 +02:00
parent f69f631b36
commit 31692dd78d
2 changed files with 2 additions and 5 deletions

View File

@@ -1,5 +1,4 @@
{% macro dlz(dlzs) %} {% for dlz in item.dlz if item.dlz is iterable %}
{% for dlz in dlzs if dlzs is iterable %}
dlz "{{ dlz.name }}" { dlz "{{ dlz.name }}" {
{% filter indent(bind9_config_indent, true) %} {% filter indent(bind9_config_indent, true) %}
{{ ('database "' + simple_item_list(dlz.database) + '";') }} {{ ('database "' + simple_item_list(dlz.database) + '";') }}
@@ -7,4 +6,3 @@ dlz "{{ dlz.name }}" {
{% endfilter %} {% endfilter %}
}; };
{% endfor %} {% endfor %}
{% endmacro %}

View File

@@ -21,8 +21,7 @@ options {
{% include 'named.conf.include.j2' %} {% include 'named.conf.include.j2' %}
{% endif %} {% endif %}
{% if item.dlz is defined and item.dlz %} {% if item.dlz is defined and item.dlz %}
{% from 'named.conf.dlz.j2' import dlz with context %} {% include 'named.conf.dlz.j2' %}
{{ dlz(item.dlz) }}
{% endif %} {% endif %}
{% if item.dnssec_policy is defined and item.dnssec_policy %} {% if item.dnssec_policy is defined and item.dnssec_policy %}
{% from 'named.conf.dnssec-policy.j2' import dnssec_policy with context %} {% from 'named.conf.dnssec-policy.j2' import dnssec_policy with context %}