Skip to content

Commit

Permalink
puppet-lint: fix legacy_facts
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Oct 31, 2019
1 parent 811ca4b commit 8ae82c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@
}
}
'Debian': {
if ($facts['os']['name'] == 'ubuntu' and $facts['lsbdistcodename'] in ['lucid', 'precise', 'trusty', 'xenial', 'bionic'])
# $facts['os']['distro']['codename'] is not yet well established, so we stick with the legact lsb facts for now
if ($facts['os']['name'] == 'ubuntu' and $facts['lsbdistcodename'] in ['lucid', 'precise', 'trusty', 'xenial', 'bionic']) # lint:ignore:legacy_facts
or ($facts['os']['name'] == 'debian' and $facts['os']['release']['major'] in ['6', '7', '8', '9']) {
$_module_os_overrides = {
'manage_repo' => true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/resource/mailhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@

# Add IPv6 Logic Check - Nginx service will not start if ipv6 is enabled
# and support does not exist for it in the kernel.
if ($ipv6_enable and !$facts['ipaddress6']) {
if ($ipv6_enable and !$facts['networking']['ip6']) {
warning('nginx: IPv6 support is not enabled or configured properly')
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/resource/streamhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

# Add IPv6 Logic Check - Nginx service will not start if ipv6 is enabled
# and support does not exist for it in the kernel.
if ($ipv6_enable == true) and (!$facts['ipaddress6']) {
if ($ipv6_enable == true) and (!$facts['networking']['ip6']) {
warning('nginx: IPv6 support is not enabled or configured properly')
}

Expand Down

0 comments on commit 8ae82c4

Please sign in to comment.