Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for allow-update-forwarding #252

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion manifests/server/options.pp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
# forwarders => [ '8.8.8.8', '8.8.4.4' ],
# }
#
include dns::server::params

define dns::server::options (
$allow_query = [],
$allow_recursion = [],
Expand Down Expand Up @@ -187,6 +187,7 @@
$zone_notify = undef,
$extra_options = {},
) {
include dns::server::params
$valid_check_names = ['fail', 'warn', 'ignore']
$valid_forward_policy = ['first', 'only']
$cfg_dir = $::dns::server::params::cfg_dir
Expand Down
5 changes: 5 additions & 0 deletions manifests/zone.pp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
# but content will not be replaced. This capability allows dynamic
# updates.
#
# [*allow_update_forwarding*]
# An array of IP addresses(also keys "key '<keyname>'" from which
# dynamic updates should be allowed on slaves.
#
# [*also_notify*]
# This is an array of IP addresses and optional port numbers to
# which this DNS server will send notifies when the master DNS server
Expand Down Expand Up @@ -179,6 +183,7 @@
$allow_forwarder = [],
$allow_query =[],
$allow_update =[],
$allow_update_forwarding =[],
$forward_policy = 'first',
$slave_masters = undef,
$zone_notify = undef,
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
{
"name": "puppetlabs/stdlib",
"version_requirement": ">=2.4.0 <6.0.0"
"version_requirement": ">=2.4.0 <8.0.0"
}
]
}
7 changes: 7 additions & 0 deletions templates/zone.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,11 @@ zone "<%= @zone %>" {
<%- end -%>
};
<%- end -%>
<%- if @allow_update_forwarding.size != 0 %>
allow-update-forwarding {
<%- @allow_update_forwarding.each do |ip| -%>
<%= ip %>;
<%- end -%>
};
<%- end -%>
};