i'm getting more strange issues with the firewall ...
# forge-modules
n
i'm getting more strange issues with the firewall module ( latest version on ubuntu 22.04):
Copy code
firewall { '842 LOG-AND-ACCEPT':
    chain => 'LOG-AND-ACCEPT',
    jump  => 'accept',
    proto => 'all',
  }
no corrective changes in a puppet run, if I delete the created rule:
Copy code
iptables -D LOG-AND-ACCEPT -m comment --comment "842 LOG-AND-ACCEPT" -j ACCEPT
puppet run
Copy code
Notice: /Stage[main]/Profile::Firewall::Base/Firewall[842 LOG-AND-ACCEPT]/ensure: defined 'ensure' as 'present' (corrective)
Notice: firewall[842 LOG-AND-ACCEPT]: Creating: Creating Rule '842 LOG-AND-ACCEPT' with {:name=>"842 LOG-AND-ACCEPT", :chain=>"LOG-AND-ACCEPT", :proto=>"all", :jump=>"ACCEPT", :ensure=>"present", :protocol=>"IPv4", :table=>"filter"}
Error: firewall[842 LOG-AND-ACCEPT]: Creating: Failed after 0.011915 seconds: undefined method `[]' for nil:NilClass
Error: /Stage[main]/Profile::Firewall::Base/Firewall[842 LOG-AND-ACCEPT]: Could not evaluate: Execution encountered an error
adding rule manually with
Copy code
iptables -A LOG-AND-ACCEPT -m comment --comment "842 LOG-AND-ACCEPT" -j ACCEPT
works and puppet changes nothing after that