From: Morgan Haskel <morgan@puppetlabs.com> Date: Fri, 23 Jan 2015 18:15:01 +0000 (-0800) Subject: MODULES-633 - Fix for ip6tables X-Git-Tag: 1.4.0~4^2~1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f23732aa18f67820293a57e41cb601238af89b13;p=puppet-modules%2Fpuppetlabs-firewall.git MODULES-633 - Fix for ip6tables If the packages for ip6tables aren't installed, the provider will throw an exception. Fix the provider to check to make sure the variable exists first, and update params.pp to include the required package for EL6. --- diff --git a/lib/puppet/provider/firewall/ip6tables.rb b/lib/puppet/provider/firewall/ip6tables.rb index b5df9a7..2ed3c13 100644 --- a/lib/puppet/provider/firewall/ip6tables.rb +++ b/lib/puppet/provider/firewall/ip6tables.rb @@ -45,7 +45,8 @@ Puppet::Type.type(:firewall).provide :ip6tables, :parent => :iptables, :source = def initialize(*args) - if Facter.fact('ip6tables_version').value.match /1\.3\.\d/ + ip6tables_version = Facter.value('ip6tables_version') + if ip6tables_version and ip6tables_version.match /1\.3\.\d/ raise ArgumentError, 'The ip6tables provider is not supported on version 1.3 of iptables' else super diff --git a/manifests/params.pp b/manifests/params.pp index 4d66159..9fa43a0 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -22,7 +22,7 @@ class firewall::params { if versioncmp($::operatingsystemrelease, '7.0') >= 0 { $package_name = 'iptables-services' } else { - $package_name = undef + $package_name = 'iptables-ipv6' } $service_name = 'iptables' }