I'm trying to remove a firewalld rich rule by adding the absent state however I'm getting the error "absent and present state can only be used in zone level operations".
I've specified the public zone in the task so I'm not sure how absent should be used in this case.
- name: Remove a firewall rule.
firewalld:
permanent: yes
zone: public
state: absent
immediate: yes
rich_rule: rule family="ipv4" source address="0.0.0.0/0" port protocol="tcp" port="1234" accept