firewalld

Collection: posix

Full Name: parallax.posix.firewalld

Aliases: ansible.posix.firewalld, firewalld

Synopsis

Manage firewalld

Parameters

NameTypeRequiredDefaultDescription
servicestringName of a service to manage with firewalld
portstringPort or port range to manage (e.g. 8081/tcp or 6500-6600/udp)
rich_rulestringRich rule to add or remove to/from firewalld
sourcestringSource network to add or remove to/from a zone
interfacestringNetwork interface to add or remove to/from a zone
zonestringThe firewalld zone to operate on (default zone if omitted)
statestringyesDesired state: enabled, disabled, present, or absent
permanentboolfalseShould the configuration survive a reboot
immediateboolfalseShould the configuration change be applied immediately
timeoutstring0Timeout for a rule in seconds
icmp_blockstringICMP block type to manage
icmp_block_inversionboolfalseEnable or disable ICMP block inversion
masqueradestringEnable or disable masquerade for a zone
forward_portstringPort forwarding rule to manage (e.g. port=8080:proto=tcp:toport=80)
targetstringThe firewalld zone target
offlineboolfalseUse firewall-offline-cmd instead of firewall-cmd

Example

- name: Example firewalld task
  firewalld:
    state: <your_state>