Skip to content

Commit

Permalink
MODULES-633 - Fix for ip6tables
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Morgan Haskel committed Jan 26, 2015
1 parent 0245f51 commit f23732a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/puppet/provider/firewall/ip6tables.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down

0 comments on commit f23732a

Please sign in to comment.