support creating server clauses
This commit is contained in:
parent
e562c613c9
commit
ebfa2455a1
@ -78,6 +78,7 @@ class bind (
|
||||
"${confdir}/acls.conf",
|
||||
"${confdir}/keys.conf",
|
||||
"${confdir}/views.conf",
|
||||
"${confdir}/servers.conf",
|
||||
"${confdir}/view-mappings.txt",
|
||||
"${confdir}/domain-mappings.txt",
|
||||
]:
|
||||
|
||||
17
manifests/server.pp
Normal file
17
manifests/server.pp
Normal file
@ -0,0 +1,17 @@
|
||||
# ex: syntax=puppet si ts=4 sw=4 et
|
||||
|
||||
define bind::server (
|
||||
$bogus = false,
|
||||
$edns = true,
|
||||
$key = undef,
|
||||
$transfers = undef,
|
||||
$order = '10',
|
||||
) {
|
||||
include bind
|
||||
|
||||
concat::fragment { "bind-server-${name}":
|
||||
order => $order,
|
||||
target => "${::bind::confdir}/servers.conf",
|
||||
content => template('bind/server.erb'),
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,7 @@
|
||||
include "<%= @confdir %>/acls.conf";
|
||||
include "<%= @confdir %>/keys.conf";
|
||||
include "<%= @confdir %>/views.conf";
|
||||
include "<%= @confdir %>/servers.conf";
|
||||
<%- if @statistics_port -%>
|
||||
|
||||
statistics-channels {
|
||||
|
||||
10
templates/server.erb
Normal file
10
templates/server.erb
Normal file
@ -0,0 +1,10 @@
|
||||
server <%= @name %> {
|
||||
bogus <%= @bogus ? 'yes' : 'no' %>;
|
||||
edns <%= @edns ? 'yes' : 'no' %>;
|
||||
<%- if @key -%>
|
||||
keys <%= @key %>;
|
||||
<% end -%>
|
||||
<%- if @transfers -%>
|
||||
transfers <%= @transfers %>;
|
||||
<%- end -%>
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user