]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
top scope facts
authorLukas Audzevicius <laudzevicius24@hotmail.com>
Tue, 14 Feb 2023 11:25:18 +0000 (11:25 +0000)
committerLukas Audzevicius <laudzevicius24@hotmail.com>
Tue, 14 Feb 2023 11:25:18 +0000 (11:25 +0000)
.puppet-lint.rc
.sync.yml
Rakefile
manifests/init.pp

index 53ec580531a7b2ef8cc94508beca0496aefb7cef..5421683890acc0023b91070032bd7236c2f3e833 100644 (file)
@@ -1,3 +1,2 @@
 --relative
 --no-parameter_types-check
---no-top_scope_facts-check
index 68cc2f4319f14e31939b083b25027c5e982e7cf5..88cce1e4349f05d2bb94eb9a7edea6a555515a91 100644 (file)
--- 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
index d9014db159c8bf43f6e51ee1a9aa9c5f93e7090b..bc50d6fd6a38bc56b868a0a7a64b2004b509cfc4 100644 (file)
--- 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?
index 577e22b94e8f0de19a7b7a1e5375ea87b29e1d09..b933d786b0abca4f2449da190b234706da8c035e 100644 (file)
@@ -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")
     }
   }
 }