Skip to content

Commit

Permalink
Merge pull request #7 from pixelpark/add_stdlib_9x_support
Browse files Browse the repository at this point in the history
Add Stdlib 9.x compatibility
  • Loading branch information
cruelsmith authored Aug 21, 2023
2 parents 4f882d6 + fc2667a commit d2f36a5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
6 changes: 3 additions & 3 deletions manifests/dns.pp
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@
}

unless $dns_options == undef {
if is_array($dns_options) {
$used_options = $dns_options.unique.join(',')
$used_options = if $dns_options =~ Array {
$dns_options.unique.join(',')
} else {
$used_options = $dns_options
$dns_options
}

$has_options = $facts['networkmanager_dns'][$_connection]['options'].join(',')
Expand Down
12 changes: 4 additions & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,10 @@
}

if $enable_global_dns {
if $global_dns_options {
if is_array($global_dns_options) {
$real_dns_options = join($global_dns_options, ',')
} else {
$real_dns_options = $global_dns_options
}
} else {
$real_dns_options = undef
$real_dns_options = $global_dns_options ? {
Array => $global_dns_options.join(','),
String => $global_dns_options,
default => undef,
}

file { $global_conffile:
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "LGPL-3.0-or-later",
"source": "https://git.pixelpark.com/puppet/networkmanager.git",
"dependencies": [
{ "name": "puppetlabs-stdlib", "version_requirement": ">=7.0.0 <9.0.0" }
{ "name": "puppetlabs-stdlib", "version_requirement": ">= 7.0.0 < 10.0.0" }
],
"operatingsystem_support": [
{
Expand Down

0 comments on commit d2f36a5

Please sign in to comment.