diff --git a/templates/etc/bind/macros.j2 b/templates/etc/bind/macros.j2 index 1a89a8d..2a839dd 100644 --- a/templates/etc/bind/macros.j2 +++ b/templates/etc/bind/macros.j2 @@ -36,6 +36,13 @@ view "{{ view.name }}" { {% endfor %} }; recursion {{ view.recursion | default("no") }}; +{% if view.allow_recursion is defined and view.allow_recursion %} + allow-recursion { +{% for host in view.allow_recursion %} + {{ host }}; +{% endfor %} + }; +{% endif %} {% if view.zones is defined and view.zones %} {% for zone in view.zones %} @@ -73,13 +80,6 @@ zone "{{ zone.name }}" { {% endfor %} }; {% endif %} -{% if zone.allow_recursion is defined and zone.allow_recursion %} - allow-recursion { -{% for host in zone.allow_recursion %} - {{ host }}; -{% endfor %} - }; -{% endif %} {% if zone.update_policy is defined and zone.update_policy %} update-policy { {% for policy in zone.update_policy %}