timeout in ansible.posix.firewalld

35 views
Skip to first unread message

Ozgur G

unread,
May 27, 2021, 8:22:26 AM5/27/21
to Ansible Project
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:

Thanks, 
Ozgur 

Dick Visser

unread,
May 27, 2021, 8:33:37 AM5/27/21
to ansible...@googlegroups.com
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."
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c76c6bc4-2e0d-4e19-b77f-33d87cf342d5n%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Felix Fontein

unread,
May 27, 2021, 9:47:22 AM5/27/21
to ansible...@googlegroups.com
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


Ozgur G

unread,
May 27, 2021, 11:15:07 AM5/27/21
to Ansible Project
Thanks Dick and Felix. I've created a documentation issue.

Brian Coca

unread,
May 27, 2021, 12:53:28 PM5/27/21
to Ansible Project
The 'firewall' library referenced is part of firewalld itself.

--
----------
Brian Coca

Reply all
Reply to author
Forward
0 new messages