1

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
MattB
  • 135
  • 1
  • 3
  • 10

1 Answers1

1

Use disabled instead... enabled and disabled are for setting firewall settings and absent and present are for zone creation and removal. Though it's possible this needs changing.

Adam Miller
  • 872
  • 4
  • 6