By setting bind::include_default_zones to false, a user can suppress the inclusion of the default definitions for the root hints zone and RFC 1912 zones. These are supplied with the BIND package's default configuration on both Debian and RedHat derived systems. These zones are necessary for a resolver, but may be omitted if the server acts strictly as an authoritative server.
55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
|
|
view "<%= @name %>" {
|
|
<%- if @match_clients and @match_clients != '' -%>
|
|
match-clients {
|
|
<%- Array(@match_clients).each do |match_client| -%>
|
|
<%= match_client %>;
|
|
<%- end -%>
|
|
};
|
|
<%- end -%>
|
|
<%- if @match_destinations and @match_destinations != '' -%>
|
|
match-destinations {
|
|
<%- Array(@match_destinations).each do |match_destination| -%>
|
|
<%= match_destination %>;
|
|
<%- end -%>
|
|
};
|
|
<%- end -%>
|
|
recursion <%= @recursion ? 'yes' : 'no' %>;
|
|
<%- if @recursion_match_only -%>
|
|
match-recursive-only yes;
|
|
<%- end -%>
|
|
<%- if @recursion -%>
|
|
<%- if @recursion_match_clients and @recursion_match_clients != '' -%>
|
|
allow-recursion {
|
|
<%- Array(@recursion_match_clients).each do |match_client| -%>
|
|
<%= match_client %>;
|
|
<%- end -%>
|
|
};
|
|
<%- end -%>
|
|
<%- if @recursion_match_destinations and @recursion_match_destinations != '' -%>
|
|
allow-recursion-on {
|
|
<%- Array(@recursion_match_destinations).each do |match_destination| -%>
|
|
<%= match_destination %>;
|
|
<%- end -%>
|
|
};
|
|
<%- end -%>
|
|
<%- end -%>
|
|
<%- if @servers and @servers.is_a?(Array) -%>
|
|
<%- @servers.each do |properties| -%>
|
|
<%- raise Puppet::Error, 'view servers must have an ip_addr key' unless properties.has_key?('ip_addr') -%>
|
|
server <%= properties['ip_addr'] %> {
|
|
<%- if properties.has_key?('keys') and properties['keys'] != '' -%>
|
|
keys { <%= properties['keys'] %>; };
|
|
<%- end -%>
|
|
};
|
|
<%- end -%>
|
|
<%- end -%>
|
|
<%- if @include_default_zones and @default_zones_include -%>
|
|
include "<%= @default_zones_include %>";
|
|
<%- end -%>
|
|
|
|
<%- Array(@zones).each do |zone| -%>
|
|
include "<%= @confdir %>/zones/<%= zone %>.conf";
|
|
<%- end -%>
|
|
};
|