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 also_notify to options #75

Open
bepstein opened this issue Apr 6, 2017 · 1 comment
Open

Add also_notify to options #75

bepstein opened this issue Apr 6, 2017 · 1 comment

Comments

@bepstein
Copy link

bepstein commented Apr 6, 2017

Can you add support to add also_notify arrays to the options section? Here is a patch that I believe will work.

`diff --git a/manifests/server/conf.pp b/manifests/server/conf.pp
index 14fcbc1..070c128 100644
--- a/manifests/server/conf.pp
+++ b/manifests/server/conf.pp
@@ -41,6 +41,8 @@

Array of IP addrs or ACLs to allow recursion from. Default: empty

$allow_transfer:

Array of IP addrs or ACLs to allow transfer to. Default: empty

+# $also_notify:
+# Array of IP addrs or ACLs to send notifies to. Default: empty

$check_names:

Array of check-names strings. Example: [ 'master ignore' ]. Default: empty

$extra_options:

@@ -109,6 +111,7 @@ define bind::server::conf (
$recursion = 'yes',
$allow_recursion = [],
$allow_transfer = [],

  • $also_notify = [],
    $check_names = [],
    $extra_options = {},
    $dnssec_enable = 'yes',
    diff --git a/templates/named.conf.erb b/templates/named.conf.erb
    index 8d0c471..3d266f8 100644
    --- a/templates/named.conf.erb
    +++ b/templates/named.conf.erb
    @@ -78,6 +78,9 @@ options {
    <% if !@allow_transfer.empty? -%>
    allow-transfer { <%= @allow_transfer.join("; ") %>; };
    <% end -%>
    +<% if !@also_notify.empty? -%>
  • also-notify { <%= @also_notify.join("; ") %>; };
    +<% end -%>
    <% if !@check_names.empty? -%>
    <% @check_names.each do |line| -%>
    check-names <%= line %>;
    @@ -116,7 +119,7 @@ logging {
    <% if !@views.empty? -%>

<% @views.sort_by {|key,value| key}.each do |key,value| -%>
-<% valid_keys = %w(allow-notify allow-query allow-recursion allow-transfer allow-update-forwarding forwarders match-clients match-destinations match-recursive-only) -%>
+<% valid_keys = %w(allow-notify allow-query allow-recursion allow-transfer also-notify allow-update-forwarding forwarders match-clients match-destinations match-recursive-only) -%>
view "<%= key %>" {
<% valid_keys.sort.each do |valid_key| -%>
<% if value[valid_key] and !value[valid_key].empty? -%>
`

Thanks,
ep

@bepstein
Copy link
Author

bepstein commented Apr 6, 2017

Perhaps an attachment would be better.

also-notify.patch.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant