Skip to content

Commit fbebe5f

Browse files
author
Alexandros Afentoulis
committed
stub: add support for stub-first stub zone option
Add support for stub-first stub zone option, which default to false. It allows queries to be attempted again without the stub clause if they failed with stub.
1 parent e431b7a commit fbebe5f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

manifests/stub.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
# lookups does not affect an (unsigned) internal domain. A DS record
2525
# externally can create validation failures for that internal domain.
2626
#
27+
# [*stub_first*]
28+
# (optional) Defaults to false. Controls 'stub-first' stub zone option.
29+
# If true, a query that fails with the stub clause is attempted again
30+
# without the stub clause.
31+
#
2732
# [*type*]
2833
# (optional) Defaults to 'transparent', can be 'deny', 'refuse', 'static',
2934
# 'transparent', 'typetransparent', 'redirect' or 'nodefault'.
@@ -37,6 +42,7 @@
3742
# lint:ignore:quoted_booleans
3843
Variant[Boolean, Enum['true', 'false']] $insecure = false,
3944
Variant[Boolean, Enum['true', 'false']] $no_cache = false,
45+
Variant[Boolean, Enum['true', 'false']] $stub_first = false,
4046
# lint:endignore
4147
Unbound::Local_zone_type $type = 'transparent',
4248
Optional[Stdlib::Unixpath] $config_file = undef,

templates/stub.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ stub-zone:
66
<% @nameservers.each do |host| -%>
77
stub-host: <%= host %>
88
<% end -%>
9+
<% if @stub_first == 'true' or @stub_first == true -%>
10+
stub-first: yes
11+
<% end -%>
912
<% if @no_cache == 'true' or @no_cache == true -%>
1013
stub-no-cache: yes
1114
<% end -%>

0 commit comments

Comments
 (0)