diff --git a/templates/named.conf.generator.j2 b/templates/named.conf.generator.j2 index f025edd..56bd502 100644 --- a/templates/named.conf.generator.j2 +++ b/templates/named.conf.generator.j2 @@ -51,8 +51,7 @@ options { {% include 'named.conf.tls.j2' %} {% endif %} {% if item.trust_anchors is defined and item.trust_anchors %} -{% from 'named.conf.trust-anchors.j2' import trust_anchors with context %} -{{ trust_anchors(item.trust_anchors) }} +{% include 'named.conf.trust-anchors.j2' %} {% endif %} {% if item.zones is defined and item.zones %} {% from 'named.conf.zone.j2' import zones with context %} diff --git a/templates/named.conf.trust-anchors.j2 b/templates/named.conf.trust-anchors.j2 index 033fb57..b4669ac 100644 --- a/templates/named.conf.trust-anchors.j2 +++ b/templates/named.conf.trust-anchors.j2 @@ -1,7 +1,6 @@ -{% macro trust_anchors(trust_anchors) %} trust-anchors { {% filter indent(bind9_config_indent, true) %} -{% for anchor in trust_anchors if trust_anchors is iterable %} +{% for anchor in item.trust_anchors if item.trust_anchors is iterable %} {{ (anchor.name | string) -}} {{ (' ' + anchor.type) -}} {{ (' ' + anchor.flags | string) -}} @@ -10,4 +9,3 @@ trust-anchors { {{ (' "' + anchor.key + '"') -}}; {% endfor %} {% endfilter %}}; -{% endmacro %} \ No newline at end of file