Skip to content

Commit

Permalink
Merge pull request #54 from icann-dns/add_tsig_key
Browse files Browse the repository at this point in the history
add keys support
  • Loading branch information
thias committed Feb 2, 2016
2 parents 5078607 + 2e80021 commit 7dee143
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions manifests/server/conf.pp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,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 @@ -77,6 +80,12 @@
# 'masters { mymasters; }',
# ],
# }
# keys => {
# 'example.org-tsig' => [
# 'algorithm hmac-md5',
# 'secret "aaabbbcccddd"',
# ],
# }
# }
#
define bind::server::conf (
Expand Down Expand Up @@ -106,6 +115,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 [email protected]? -%>
<% @keys.sort_by {|key, value| key}.each do |key,value| -%>
key "<%= key %>" {
<% value.each do |line| -%>
<%= line %>;
<% end -%>
};

<% end -%>
<% end -%>
<% if [email protected]? -%>
Expand Down

0 comments on commit 7dee143

Please sign in to comment.