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