]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Made Facter flushing specific to a single fact.
authorJonathan Tripathy <jt@puppetlabs.com>
Wed, 10 Feb 2016 10:49:15 +0000 (10:49 +0000)
committerJonathan Tripathy <jt@puppetlabs.com>
Wed, 10 Feb 2016 10:49:15 +0000 (10:49 +0000)
lib/puppet/util/firewall.rb

index 8acbd469ed50974dcd73f03afa3343b463cdcbc8..d094b4cdfd8975fdece0abaa703f1634faf92328 100644 (file)
@@ -160,9 +160,9 @@ module Puppet::Util::Firewall
 
     # Older iptables-persistent doesn't provide save action.
     if os_key == 'Debian'
-      # We need to call Facter.flush to clear Facter cache as it's possible the cached value will be nil due to the fact
+      # We need to call flush to clear Facter cache as it's possible the cached value will be nil due to the fact
       # that the iptables-persistent package was potentially installed after the initial Fact gathering.
-      Facter.flush
+      Facter.fact(:iptables_persistent_version).flush
       persist_ver = Facter.value(:iptables_persistent_version)
       if (persist_ver and Puppet::Util::Package.versioncmp(persist_ver, '0.5.0') < 0)
         os_key = 'Debian_manual'