]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
(maint) remove fact.flush
authorgimmy <gheorghe.popescu@puppet.com>
Fri, 13 Mar 2020 12:43:10 +0000 (14:43 +0200)
committerAndrei Filipovici <andrei.filipovici@andreis-mbp.eth.tsr.corp.puppet.net>
Wed, 18 Mar 2020 10:35:44 +0000 (12:35 +0200)
lib/puppet/util/firewall.rb

index 9695444b223d59574f7b7ed1aeeb06b69b02cc59..676bcf82e9e41ad887b86394dbed9d98e3cffb0d 100644 (file)
@@ -180,9 +180,7 @@ module Puppet::Util::Firewall
 
     # Older iptables-persistent doesn't provide save action.
     if os_key == 'Debian'
-      # 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.fact(:iptables_persistent_version).flush
+      Facter.fact(:iptables_persistent_version)
       persist_ver = Facter.value(:iptables_persistent_version)
       if persist_ver && Puppet::Util::Package.versioncmp(persist_ver, '0.5.0') < 0
         os_key = 'Debian_manual'