firewalld
Collection: posix
Full Name: parallax.posix.firewalld
Aliases: ansible.posix.firewalld, firewalld
Synopsis
Manage firewalld
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| service | string | Name of a service to manage with firewalld | ||
| port | string | Port or port range to manage (e.g. 8081/tcp or 6500-6600/udp) | ||
| rich_rule | string | Rich rule to add or remove to/from firewalld | ||
| source | string | Source network to add or remove to/from a zone | ||
| interface | string | Network interface to add or remove to/from a zone | ||
| zone | string | The firewalld zone to operate on (default zone if omitted) | ||
| state | string | yes | Desired state: enabled, disabled, present, or absent | |
| permanent | bool | false | Should the configuration survive a reboot | |
| immediate | bool | false | Should the configuration change be applied immediately | |
| timeout | string | 0 | Timeout for a rule in seconds | |
| icmp_block | string | ICMP block type to manage | ||
| icmp_block_inversion | bool | false | Enable or disable ICMP block inversion | |
| masquerade | string | Enable or disable masquerade for a zone | ||
| forward_port | string | Port forwarding rule to manage (e.g. port=8080:proto=tcp:toport=80) | ||
| target | string | The firewalld zone target | ||
| offline | bool | false | Use firewall-offline-cmd instead of firewall-cmd |
Example
- name: Example firewalld task
firewalld:
state: <your_state>