Skip to content

Commit

Permalink
Update provider_firewall_firewalld.rb (#247)
Browse files Browse the repository at this point in the history
* Update provider_firewall_firewalld.rb

Documentation says `FirewallD - Red Hat & CentOS >= 7.0` but on RHEL/Alma/Rocky 8 it defaults to iptables. This should fix that.

Co-authored-by: Dan Webb <dan.webb@damacus.io>
  • Loading branch information
athiede-vendavo and damacus authored Aug 1, 2023
1 parent 2f6ddb5 commit d20f9a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This file is used to list changes made in each version of the firewall cookbook.

## Unreleased

- Default to `firewalld` on EL8

## 6.2.18 - *2023-07-31*

Fixes typo in FORWARD chain of nftables default ruleset
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_firewall_firewalld.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Provider::FirewallFirewalld < Chef::Provider::LWRPBase
include FirewallCookbook::Helpers::Firewalld

provides :firewall, os: 'linux', platform_family: %w(rhel fedora amazon) do |node|
(node['platform_version'].to_i == 7 && !node['firewall']['redhat7_iptables']) || (amazon_linux? && !node['firewall']['redhat7_iptables'])
(node['platform_version'].to_i >= 7 && !node['firewall']['redhat7_iptables']) || (amazon_linux? && !node['firewall']['redhat7_iptables'])
end

def whyrun_supported?
Expand Down

0 comments on commit d20f9a3

Please sign in to comment.