diff --git a/iptables/init.sls b/iptables/init.sls index 23bdc6e..29cd0d4 100644 --- a/iptables/init.sls +++ b/iptables/init.sls @@ -6,7 +6,9 @@ {%- set install = firewall.install %} {%- set strict_mode = firewall.strict %} {%- set global_block_nomatch = firewall.block_nomatch %} -{%- set packages = firewall.pkgs %} +{#- TODO: Ideally, this Fedora 34 fix should be provided from `osfingermap.yaml` but that isn't available #} +{#- Resolve this when the new `map.jinja` is made available for this formula #} +{%- set packages = ['iptables-compat'] if grains.get('osfinger', '') == 'Fedora-34' else firewall.pkgs %} {%- set ipv4 = 'IPv4' %} {%- set ipv6 = 'IPv6' %} {%- set protocols = [ipv4] %} diff --git a/test/integration/default/controls/packages_spec.rb b/test/integration/default/controls/packages_spec.rb index 5a285ac..b4b0dfa 100644 --- a/test/integration/default/controls/packages_spec.rb +++ b/test/integration/default/controls/packages_spec.rb @@ -2,12 +2,18 @@ common_packages = ['iptables'] -case os[:name] -when 'debian', 'ubuntu' - all_packages = common_packages + %w[iptables-persistent netbase] -else - all_packages = common_packages -end +all_packages = + case platform[:name] + when 'debian', 'ubuntu' + common_packages + %w[iptables-persistent netbase] + else + case system.platform[:finger] + when 'fedora-34' + ['iptables-compat'] + else + common_packages + end + end control 'Packages' do all_packages.each do |p|