wait_for module related

28 views
Skip to first unread message

Max

unread,
May 27, 2015, 3:19:05 AM5/27/15
to ansible...@googlegroups.com
I was wondering how does wait_for figures out if a port is listening on remote machine. Does it use port scanners like nmap or netcat or simply makes a telnet connection on that port?

alxgu

unread,
May 27, 2015, 5:39:44 AM5/27/15
to ansible...@googlegroups.com
It will try to open a socket.

...
 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                s.settimeout(connect_timeout)
                try:
                    s.connect( (host, port) )
...
Reply all
Reply to author
Forward
0 new messages