Skip to content

Commit

Permalink
update tsig key locality
Browse files Browse the repository at this point in the history
  • Loading branch information
b4ldr committed Aug 8, 2016
1 parent 66a56c7 commit 210532a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions manifests/zone.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
$zones = [],
$zonefile = undef,
$zone_dir = undef,
$tsig_name = undef,
) {

validate_array($masters)
Expand All @@ -25,6 +26,16 @@
} else {
$zone_subdir = $::knot::zone_subdir
}
if $tsig_name {
validate_string($tsig_name)
if defined(Knot::Tsig[$tsig_name]) {
$_tsig_name = $tsig_name
} else {
fail("Nsd::Tsig['${tsig_name}'] does not exist")
}
} elsif has_key($::knot::tsig, 'name') {
$_tsig_name = $::knot::tsig['name']
}
concat::fragment{ "knot_zones_${name}":
target => $::knot::conf_file,
content => template($::knot::zones_template),
Expand Down
4 changes: 2 additions & 2 deletions templates/etc/knot/knot.zones.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ remotes {
xfr-in-<%= @name %><%= index + 1 %> {
address <%= master %>;
port 53;
<%- if @tsig then -%>
key <%= @tsig['name'] %>;
<%- if @_tsig_name then -%>
key <%= @_tsig_name %>;
<%- end -%>
}
<%- end -%>
Expand Down

0 comments on commit 210532a

Please sign in to comment.