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 dnssec-policy #205

Merged
merged 1 commit into from
Feb 16, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions manifests/zone.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
# @param inline_signing
# @param dnssec_secure_to_insecure
# @param auto_dnssec
# @param dnssec_policy
# Causes the zone to be signed and turns on automatic maintenance for the zone.
#
define dns::zone (
Array[String] $target_views = [],
Expand Down Expand Up @@ -80,6 +82,7 @@
Optional[Enum['yes', 'no']] $inline_signing = undef,
Optional[Enum['yes', 'no']] $dnssec_secure_to_insecure = undef,
Optional[Enum['allow', 'maintain', 'off']] $auto_dnssec = undef,
Optional[String[1]] $dnssec_policy = undef,
) {

$_contact = pick($contact, "root.${zone}.")
Expand Down
2 changes: 2 additions & 0 deletions spec/defines/dns_zone_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@
:key_directory => '/etc/bind/keys',
:auto_dnssec => 'maintain',
:update_policy => 'local',
:dnssec_policy => 'foo',
} }

it "should have valid zone configuration" do
Expand All @@ -419,6 +420,7 @@
' inline-signing yes;',
' key-directory "/etc/bind/keys";',
' update-policy local;',
' dnssec-policy foo;',
'};',
])
end
Expand Down
3 changes: 3 additions & 0 deletions templates/named.zone.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ zone "<%= @zone %>" {
<% if @inline_signing -%>
inline-signing <%= @inline_signing %>;
<% end -%>
<% if @dnssec_policy -%>
dnssec-policy <%= @dnssec_policy %>;
<% end -%>
<% if @key_directory -%>
key-directory "<%= @key_directory %>";
<% end -%>
Expand Down