Skip to content

Commit

Permalink
add resolver_options
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightning- committed Dec 4, 2023
1 parent 9382a73 commit d75f0a0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ foreman_network::route_overrides: {}
foreman_network::manage_network_interface_restart: true
foreman_network::manage_if_from_facts_only: true
foreman_network::resolv_conf_path: /etc/resolv.conf
foreman_network::resolver_options: []
foreman_network::debug: false
foreman_network::searchpath_merge: true
foreman_network::searchpath: []
13 changes: 13 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
# @param resolv_conf_path
# The path of the resolv.conf. For docker accaptance test this could be modified
#
# @param resolver_options
# ENC node parameter with key resolver_options injected by foreman
#
# @param route_overrides
# Overrides the default route provided by foreman and could also add additional static network routes.
# IMPORTANT: If DHCP enabled is enabled on the primary interface. All routes on the primary interface will be ignored.
Expand All @@ -46,6 +49,7 @@
Boolean $manage_network_interface_restart,
Boolean $manage_if_from_facts_only,
Stdlib::Absolutepath $resolv_conf_path,
Array $resolver_options,
Boolean $debug,
Boolean $searchpath_merge,
Array $searchpath,
Expand Down Expand Up @@ -93,9 +97,18 @@
else {
$real_searchpath = $foreman_searchpath
}

if $::resolver_options {
$real_resolver_options = flatten($::resolver_options, $resolver_options)
}
else {
$real_resolver_options = flatten($resolver_options)
}

$network_resolv_conf = {
'nameservers' => $real_nameservers,
'searchpath' => $real_searchpath,
'options' => $real_resolver_options,
}
}

Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markt-foreman_network",
"version": "1.2.0",
"version": "1.3.0-rc0",
"author": "markt.de",
"summary": "Puppet Module to configure network interfaces, routes and resolv.conf with Foreman ENC network interface data",
"license": "Apache-2.0",
Expand Down

0 comments on commit d75f0a0

Please sign in to comment.