Skip to content

Commit 9b33258

Browse files
authored
Merge pull request #339 from anthonysomerset/add_interface_auto_ports
adding support for interface_automatic_ports
2 parents da22fa3 + 86cf46d commit 9b33258

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

REFERENCE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The following parameters are available in the `unbound` class:
4646
* [`hints_file_content`](#-unbound--hints_file_content)
4747
* [`unbound_version`](#-unbound--unbound_version)
4848
* [`update_root_hints`](#-unbound--update_root_hints)
49+
* [`interface_automatic_ports`](#-unbound--interface_automatic_ports)
4950
* [`manage_service`](#-unbound--manage_service)
5051
* [`verbosity`](#-unbound--verbosity)
5152
* [`statistics_interval`](#-unbound--statistics_interval)
@@ -281,6 +282,14 @@ If set to true (and hints_file isn't set to 'builtin') a systemd timer will be c
281282

282283
Default value: `fact('systemd') ? { true => 'present', default => 'unmanaged'`
283284

285+
##### <a name="-unbound--interface_automatic_ports"></a>`interface_automatic_ports`
286+
287+
Data type: `Optional[String[1]]`
288+
289+
specifies the default ports to listen on when interface_automatic is also set to true, defaults to undef, specify as a string of space seperated ports e.g. "53 853 443"
290+
291+
Default value: `undef`
292+
284293
##### <a name="-unbound--manage_service"></a>`manage_service`
285294

286295
Data type: `Boolean`

manifests/init.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
# the version of the installed unbound instance. defaults to the fact, but you can overwrite it. this reduces the initial puppet runs from two to one
1010
# @param update_root_hints
1111
# If set to true (and hints_file isn't set to 'builtin') a systemd timer will be configured to update the root hints file every month
12+
# @param interface_automatic_ports
13+
# specifies the default ports to listen on when interface_automatic is also set to true, defaults to undef, specify as a string of space seperated ports e.g. "53 853 443"
1214
#
1315
class unbound (
1416
Boolean $manage_service = true,
@@ -20,6 +22,7 @@
2022
Integer[0, 65535] $port = 53,
2123
Array[String[1]] $interface = [],
2224
Boolean $interface_automatic = false,
25+
Optional[String[1]] $interface_automatic_ports = undef,
2326
Array[String[1]] $outgoing_interface = [], # version 1.5.10
2427
Optional[Integer[1]] $outgoing_range = undef,
2528
Unbound::Range $outgoing_port_permit = '32768-65535',

templates/unbound.conf.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ server:
3434
<%= print_config('port', @port) -%>
3535
<%= print_config('interface', @interface) -%>
3636
<%= print_config('interface-automatic', @interface_automatic) -%>
37+
<% if @interface_automatic_ports -%>
38+
<%= print_config('interface-automatic-ports', @interface_automatic_ports) -%>
39+
<% end -%>
3740
<%= print_config('outgoing-interface', @outgoing_interface) -%>
3841
<%= print_config('outgoing-range', @outgoing_range) -%>
3942
<%- if @outgoing_port_permit_first -%>

0 commit comments

Comments
 (0)