From d95480dd9bbcdfbf7ecd6433d47ffbd1727b9625 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Tue, 14 Feb 2023 11:25:18 +0000 Subject: [PATCH] top scope facts --- .puppet-lint.rc | 1 - .sync.yml | 1 - Rakefile | 1 - manifests/init.pp | 4 ++-- 4 files changed, 2 insertions(+), 5 deletions(-) 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") } } } -- 2.45.2