diff --git a/templates/view.erb b/templates/view.erb index 839e1ef..866afd7 100644 --- a/templates/view.erb +++ b/templates/view.erb @@ -15,6 +15,20 @@ view "<%= @name %>" { }; <%- end -%> recursion <%= @recursion ? 'yes' : 'no' %>; +<%- if @recursion -%> +<%- if @match_clients and @match_clients != '' -%> + allow-recursion { +<%- Array(@match_clients).each do |match_client| -%> + <%= match_client %>; +<%- end -%> +<%- elsif @match_destinations and @match_destinations != '' -%> + allow-recursion-on { +<%- Array(@match_destinations).each do |match_destination| -%> + <%= match_destination %>; +<%- end -%> +<%- end -%> + }; +<%- end -%> <%- if scope.lookupvar('osfamily') == 'Debian' -%> include "<%= @confdir %>/named.conf.default-zones"; <%- end -%>