Add the ability to specify server directives in a view (e.g. using TSIG keys) with a slave -> master.

This commit is contained in:
Thomas Farvour 2015-09-02 12:37:17 -07:00 committed by Nate Riffe
parent a403718c32
commit 8005dfa7d9
2 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,7 @@
define bind::view ( define bind::view (
$match_clients = 'any', $match_clients = 'any',
$match_destinations = '', $match_destinations = '',
$servers = {},
$zones = [], $zones = [],
$recursion = true, $recursion = true,
$recursion_match_clients = 'any', $recursion_match_clients = 'any',

View File

@ -34,6 +34,15 @@ view "<%= @name %>" {
}; };
<%- end -%> <%- end -%>
<%- end -%> <%- end -%>
<%- if @server -%>
<%- @server.each_pair do |srv, srv_values| -%>
server <%= srv %> {
<%- Array(srv_values).each do |srv_value| -%>
<%= srv_value %>;
<%- end -%>
};
<%- end -%>
<%- end -%>
<%- if scope.lookupvar('osfamily') == 'Debian' -%> <%- if scope.lookupvar('osfamily') == 'Debian' -%>
include "<%= @confdir %>/named.conf.default-zones"; include "<%= @confdir %>/named.conf.default-zones";
<%- end -%> <%- end -%>