Distinguish view access from recursion access
Make recursion_match_clients and recursion_match_destinations mirroring the existing match_clients and match_destinations in order to distinguish recursion access as a proper subset of view access.
This commit is contained in:
parent
66cc6ea21d
commit
e365f5e49a
@ -1,10 +1,12 @@
|
||||
# ex: syntax=puppet si ts=4 sw=4 et
|
||||
|
||||
define bind::view (
|
||||
$match_clients = 'any',
|
||||
$match_destinations = '',
|
||||
$zones = [],
|
||||
$recursion = true,
|
||||
$match_clients = 'any',
|
||||
$match_destinations = '',
|
||||
$zones = [],
|
||||
$recursion = true,
|
||||
$recursion_match_clients = 'any',
|
||||
$recursion_match_destinations = '',
|
||||
) {
|
||||
$confdir = $bind::params::confdir
|
||||
|
||||
|
||||
@ -16,18 +16,20 @@ view "<%= @name %>" {
|
||||
<%- end -%>
|
||||
recursion <%= @recursion ? 'yes' : 'no' %>;
|
||||
<%- if @recursion -%>
|
||||
<%- if @match_clients and @match_clients != '' -%>
|
||||
<%- if @recursion_match_clients and @recursion_match_clients != '' -%>
|
||||
allow-recursion {
|
||||
<%- Array(@match_clients).each do |match_client| -%>
|
||||
<%- Array(@recursion_match_clients).each do |match_client| -%>
|
||||
<%= match_client %>;
|
||||
<%- end -%>
|
||||
<%- elsif @match_destinations and @match_destinations != '' -%>
|
||||
};
|
||||
<%- end -%>
|
||||
<%- if @recursion_match_destinations and @recursion_match_destinations != '' -%>
|
||||
allow-recursion-on {
|
||||
<%- Array(@match_destinations).each do |match_destination| -%>
|
||||
<%- Array(@recursion_match_destinations).each do |match_destination| -%>
|
||||
<%= match_destination %>;
|
||||
<%- end -%>
|
||||
<%- end -%>
|
||||
};
|
||||
<%- end -%>
|
||||
<%- end -%>
|
||||
<%- if scope.lookupvar('osfamily') == 'Debian' -%>
|
||||
include "<%= @confdir %>/named.conf.default-zones";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user