From: Lukas Audzevicius Date: Tue, 14 Feb 2023 11:25:18 +0000 (+0000) Subject: top scope facts X-Git-Tag: v4.1.0~5^2~2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=d95480dd9bbcdfbf7ecd6433d47ffbd1727b9625;p=puppet-modules%2Fpuppetlabs-firewall.git top scope facts --- diff --git a/.puppet-lint.rc b/.puppet-lint.rc index 53ec580..5421683 100644 --- a/.puppet-lint.rc +++ b/.puppet-lint.rc @@ -1,3 +1,2 @@ --relative --no-parameter_types-check ---no-top_scope_facts-check diff --git a/.sync.yml b/.sync.yml index 68cc2f4..88cce1e 100644 --- a/.sync.yml +++ b/.sync.yml @@ -35,4 +35,3 @@ changelog_since_tag: 'v3.0.0' Rakefile: extra_disabled_lint_checks: - parameter_types - - top_scope_facts diff --git a/Rakefile b/Rakefile index d9014db..bc50d6f 100644 --- a/Rakefile +++ b/Rakefile @@ -43,7 +43,6 @@ end PuppetLint.configuration.send('disable_relative') PuppetLint.configuration.send('disable_parameter_types') -PuppetLint.configuration.send('disable_top_scope_facts') if Bundler.rubygems.find_name('github_changelog_generator').any? diff --git a/manifests/init.pp b/manifests/init.pp index 577e22b..b933d78 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -61,7 +61,7 @@ class firewall ( } } - case $::kernel { + case $facts['kernel'] { 'Linux': { class { "${title}::linux": ensure => $ensure, @@ -77,7 +77,7 @@ class firewall ( 'FreeBSD', 'windows': { } default: { - fail("${title}: Kernel '${::kernel}' is not currently supported") + fail("${title}: Kernel '${facts['kernel']}' is not currently supported") } } }