# timeout in ansible.posix.firewalld

**URL:** <https://forum.ansible.com/t/timeout-in-ansible-posix-firewalld/35238>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [May 27, 2021, 12:22pm UTC](https://forum.ansible.com/t/timeout-in-ansible-posix-firewalld/35238 "2021-05-27T12:22:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ozgur\_G](https://avatars.discourse-cdn.com/v4/letter/o/f08c70/32.png) [@Ozgur\_G](https://forum.ansible.com/u/Ozgur_G)\
**Post date:** [May 27, 2021, 12:22pm UTC](https://forum.ansible.com/t/timeout-in-ansible-posix-firewalld/35238/1 "2021-05-27T12:22:26Z")

</div>

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](https://docs.ansible.com/ansible/latest/collections/ansible/posix/firewalld_module.html)

Thanks,  
Ozgur

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [May 27, 2021, 12:33pm UTC](https://forum.ansible.com/t/timeout-in-ansible-posix-firewalld/35238/2 "2021-05-27T12:33:11Z")

</div>

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](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."

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [May 27, 2021, 1:47pm UTC](https://forum.ansible.com/t/timeout-in-ansible-posix-firewalld/35238/3 "2021-05-27T13:47:04Z")

</div>

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](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](https://github.com/ansible-collections/ansible.posix/issues) for this.  
This really should be documented...

Cheers,  
Felix

---

<div class="post-metadata">

**Author:** ![Ozgur\_G](https://avatars.discourse-cdn.com/v4/letter/o/f08c70/32.png) [@Ozgur\_G](https://forum.ansible.com/u/Ozgur_G)\
**Post date:** [May 27, 2021, 3:15pm UTC](https://forum.ansible.com/t/timeout-in-ansible-posix-firewalld/35238/4 "2021-05-27T15:15:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [May 27, 2021, 4:52pm UTC](https://forum.ansible.com/t/timeout-in-ansible-posix-firewalld/35238/5 "2021-05-27T16:52:43Z")

</div>

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