timeout in ansible.posix.firewalld

Hi,
I’m using ansible on RHEL 7 remote servers to open up some ports temporarily.

I’m looking at the official documentation but it is not clear to me whether the timeout set in integer is whether in seconds or minutes.

Do you have any thoughts (before I start figuring out by myself)?

Ref:
https://docs.ansible.com/ansible/latest/collections/ansible/posix/firewalld_module.html

Thanks,
Ozgur

I'm not sure but it looks like several of the parameters for that
ansible module map to the arguments of firewall-cmd:
https://firewalld.org/documentation/man-pages/firewall-cmd.html

In that case, the syntax would be:
"either a number (of seconds) or number followed by one of characters
s (seconds), m (minutes), h (hours), for example 20m or 1h."

Hi,

I'm not sure but it looks like several of the parameters for that
ansible module map to the arguments of firewall-cmd:
https://firewalld.org/documentation/man-pages/firewall-cmd.html

In that case, the syntax would be:
"either a number (of seconds) or number followed by one of characters
s (seconds), m (minutes), h (hours), for example 20m or 1h."

that won't work, since the `timeout` parameter is of type integer.

Also the module uses some Python library called `firewall` (apparently
not the one you can install with pip) and not firewall-cmd.
Unfortunately I have no idea what this library is and where it comes
from, at least the module code itself gives no hint what unit `timeout`
is using...

In any case, I think it's worth creating a docs issue in
https://github.com/ansible-collections/ansible.posix/issues for this.
This really should be documented...

Cheers,
Felix

Thanks Dick and Felix. I’ve created a documentation issue.

The 'firewall' library referenced is part of firewalld itself.