ansible.posix.firewalld_info module – Gather information about firewalld
Note
This module is part of the ansible.posix collection (version 1.6.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install ansible.posix
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: ansible.posix.firewalld_info
.
Synopsis
This module gathers information about firewalld rules.
Requirements
The below requirements are needed on the host that executes this module.
firewalld >= 0.2.11
python-firewall
python-dbus
Parameters
Parameter |
Comments |
---|---|
Gather information about active zones. Choices:
|
|
Gather information about specific zones. If only works if |
Examples
- name: Gather information about active zones
ansible.posix.firewalld_info:
active_zones: true
register: result
- name: Print default zone for debugging
ansible.builtin.debug:
var: result.firewalld_info.default_zone
- name: Gather information about specific zones
ansible.posix.firewalld_info:
zones:
- public
- external
- internal
register: result
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Gather active zones only if turn it Returned: success Sample: |
|
A list of collected zones. Returned: success Sample: |
|
Returns various information about firewalld configuration. Returned: success |
|
The zone name of default zone. Returned: success Sample: |
|
The version information of firewalld. Returned: success Sample: |
|
A dict of zones to gather information. Returned: success |
|
The zone name registered in firewalld. Returned: success Sample: |
|
The network interface forwarding. This parameter supports on python-firewall 0.9.0(or later) and is not collected in earlier versions. Returned: success Sample: |
|
A list of forwarding port pair with protocol. Returned: success Sample: |
|
The ICMP block inversion to block all ICMP requests. Returned: success Sample: |
|
A list of blocking icmp protocol. Returned: success Sample: |
|
A list of network interfaces. Returned: success Sample: |
|
The network interface masquerading. Returned: success Sample: |
|
A list of network port with protocol. Returned: success Sample: |
|
A list of network protocol. Returned: success Sample: |
|
A list of rich language rule. Returned: success Sample: |
|
A list of network services. Returned: success Sample: |
|
A list of network source port with protocol. Returned: success Sample: |
|
A list of source network address. Returned: success Sample: |
|
A list of services in the zone. Returned: success Sample: |
|
A list of undefined zones in
Returned: success Sample: |