From f23732aa18f67820293a57e41cb601238af89b13 Mon Sep 17 00:00:00 2001 From: Morgan Haskel Date: Fri, 23 Jan 2015 10:15:01 -0800 Subject: [PATCH] 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. --- lib/puppet/provider/firewall/ip6tables.rb | 3 ++- manifests/params.pp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/firewall/ip6tables.rb b/lib/puppet/provider/firewall/ip6tables.rb index b5df9a7a4..2ed3c13da 100644 --- a/lib/puppet/provider/firewall/ip6tables.rb +++ b/lib/puppet/provider/firewall/ip6tables.rb @@ -45,7 +45,8 @@ 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 4d66159bd..9fa43a0c7 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -22,7 +22,7 @@ if versioncmp($::operatingsystemrelease, '7.0') >= 0 { $package_name = 'iptables-services' } else { - $package_name = undef + $package_name = 'iptables-ipv6' } $service_name = 'iptables' }