From 80db8ece3295f074ff6492870504a284afd28cbf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pedro=20Gonz=C3=A1lez=20Serrano?= Date: Wed, 1 Apr 2020 12:49:22 +0200 Subject: [PATCH] (MODULES-8543) Remove nftables' backend warning from iptables_save output --- lib/puppet/provider/firewall/iptables.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb index c0afbcb..7f8f9fc 100644 --- a/lib/puppet/provider/firewall/iptables.rb +++ b/lib/puppet/provider/firewall/iptables.rb @@ -406,7 +406,8 @@ Puppet::Type.type(:firewall).provide :iptables, parent: Puppet::Provider::Firewa counter = 1 # String#lines would be nice, but we need to support Ruby 1.8.5 - iptables_save.split("\n").each do |line| + nf_warning_msg = "# Warning: iptables-legacy tables present, use iptables-legacy-save to see them\n" + iptables_save.gsub(nf_warning_msg, '').split("\n").each do |line| unless line =~ %r{^\#\s+|^\:\S+|^COMMIT|^FATAL} if line =~ %r{^\*} table = line.sub(%r{\*}, '') -- 2.45.2