Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions manifests/server/conf.pp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
# $zones:
# Hash of managed zones and their configuration. The key is the zone name
# and the value is an array of config lines. Default: empty
# $tsig:
# Hash of managed tsig keys and their configuration. The key is the tsig keys name
# and the value is an array of config lines. Default: empty
# $includes:
# Array of absolute paths to named.conf include files. Default: empty
#
Expand All @@ -76,6 +79,12 @@
# 'masters { mymasters; }',
# ],
# }
# keys => {
# 'example.org-tsig' => [
# 'algorithm hmac-md5',
# 'secret "aaabbbcccddd"',
# ],
# }
# }
#
define bind::server::conf (
Expand Down Expand Up @@ -105,6 +114,7 @@
$dnssec_validation = 'yes',
$dnssec_lookaside = 'auto',
$zones = {},
$keys = {},
$includes = [],
$views = {},
) {
Expand Down
10 changes: 10 additions & 0 deletions templates/named.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ acl <%= key %> {
<% end -%>
};

<% end -%>
<% end -%>
<% if !@keys.empty? -%>
<% @keys.sort_by {|key, value| key}.each do |key,value| -%>
key "<%= key %>" {
<% value.each do |line| -%>
<%= line %>;
<% end -%>
};

<% end -%>
<% end -%>
<% if !@masters.empty? -%>
Expand Down