Skip to content

Commit 2ba9477

Browse files
Merge pull request #56 from myii/fix/use-updated-package-name-on-fedora-34
fix(fedora-34): use `iptables-compat` package for installation
2 parents 583be09 + 650c318 commit 2ba9477

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

iptables/init.sls

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
{%- set install = firewall.install %}
77
{%- set strict_mode = firewall.strict %}
88
{%- set global_block_nomatch = firewall.block_nomatch %}
9-
{%- set packages = firewall.pkgs %}
9+
{#- TODO: Ideally, this Fedora 34 fix should be provided from `osfingermap.yaml` but that isn't available #}
10+
{#- Resolve this when the new `map.jinja` is made available for this formula #}
11+
{%- set packages = ['iptables-compat'] if grains.get('osfinger', '') == 'Fedora-34' else firewall.pkgs %}
1012
{%- set ipv4 = 'IPv4' %}
1113
{%- set ipv6 = 'IPv6' %}
1214
{%- set protocols = [ipv4] %}

test/integration/default/controls/packages_spec.rb

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22

33
common_packages = ['iptables']
44

5-
case os[:name]
6-
when 'debian', 'ubuntu'
7-
all_packages = common_packages + %w[iptables-persistent netbase]
8-
else
9-
all_packages = common_packages
10-
end
5+
all_packages =
6+
case platform[:name]
7+
when 'debian', 'ubuntu'
8+
common_packages + %w[iptables-persistent netbase]
9+
else
10+
case system.platform[:finger]
11+
when 'fedora-34'
12+
['iptables-compat']
13+
else
14+
common_packages
15+
end
16+
end
1117

1218
control 'Packages' do
1319
all_packages.each do |p|

0 commit comments

Comments
 (0)