]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
[MODULES-4528] Replace Puppet.version.to_f with Puppet::Util::Package.versioncmp
authorWilson McCoubrey <wilson@puppet.com>
Thu, 16 Mar 2017 11:35:57 +0000 (11:35 +0000)
committerWilson McCoubrey <wilson@puppet.com>
Thu, 16 Mar 2017 15:23:01 +0000 (15:23 +0000)
lib/puppet/type/firewall.rb

index 2493447702cc447ee4601e385b27857c5cde267d..2fa46092bf71c993aaef516596dde91c1a8be7b0 100644 (file)
@@ -1555,7 +1555,7 @@ Puppet::Type.newtype(:firewall) do
   end
 
   # autobefore is only provided since puppet 4.0
-  if Puppet.version.to_f >= 4.0
+  if Puppet::Util::Package.versioncmp(Puppet.version, '4.0') >= 0
     # On RHEL 7 this needs to be threaded correctly to manage SE Linux permissions after persisting the rules
     autobefore(:file) do
       [ '/etc/sysconfig/iptables', '/etc/sysconfig/ip6tables' ]