From 128b947ea227b51fdea8ae130d986a5fb9c370dc Mon Sep 17 00:00:00 2001 From: Daniel Akulenok Date: Tue, 14 May 2024 13:45:31 +0200 Subject: [PATCH] demacro dnssec_policy --- templates/named.conf.dnssec-policy.j2 | 4 +--- templates/named.conf.generator.j2 | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/templates/named.conf.dnssec-policy.j2 b/templates/named.conf.dnssec-policy.j2 index cd111f4..d94867b 100644 --- a/templates/named.conf.dnssec-policy.j2 +++ b/templates/named.conf.dnssec-policy.j2 @@ -1,5 +1,4 @@ -{% macro dnssec_policy(policies) %} -{% for policy in policies if policies is iterable %} +{% for policy in item.dnssec_policy if item.dnssec_policy is iterable %} dnssec-policy "{{ policy.name }}" { {% filter indent(bind9_config_indent, true) %} {% if policy.keys is defined and policy.keys %} @@ -36,4 +35,3 @@ nsec3param {% endfilter %} }; {% endfor %} -{% endmacro %} \ No newline at end of file diff --git a/templates/named.conf.generator.j2 b/templates/named.conf.generator.j2 index 757875f..dd36dd4 100644 --- a/templates/named.conf.generator.j2 +++ b/templates/named.conf.generator.j2 @@ -24,8 +24,7 @@ options { {% include 'named.conf.dlz.j2' %} {% endif %} {% if item.dnssec_policy is defined and item.dnssec_policy %} -{% from 'named.conf.dnssec-policy.j2' import dnssec_policy with context %} -{{ dnssec_policy(item.dnssec_policy) }} +{% include 'named.conf.dnssec-policy.j2' %} {% endif %} {% if item.dyndb is defined and item.dyndb %} {% from 'named.conf.dyndb.j2' import dyndb with context %}