Skip to content

Commit

Permalink
Add support for dnssec-policy
Browse files Browse the repository at this point in the history
Allow setting the `dnssec-policy` for zones.
  • Loading branch information
smortex authored and ekohl committed Feb 16, 2022
1 parent f003b20 commit 0efe703
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
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

0 comments on commit 0efe703

Please sign in to comment.