Ansible sometimes encountered error 'SSH encountered an unknown error during the connection. '

283 views
Skip to first unread message

于杨

unread,
Jan 21, 2015, 2:45:10 AM1/21/15
to ansible...@googlegroups.com
I am pretty sure the private key and user are correct for ansible script because we only occasionally see this error. So I suspect the network connection can not be reached sometimes or SSH service is not started on remote server. So before ansible playbook ran, I want to call ping module to make sure network connection is ok, but I do not know if ansible has a module can check ssh service is ok, does telnet module work?

Brian Coca

unread,
Jan 21, 2015, 9:33:57 AM1/21/15
to ansible...@googlegroups.com
wait_for can check if a port is open, the ping module actually uses
the ssh connection, it can be used with do/until to make sure the
machine is up.


--
Brian Coca
Reply all
Reply to author
Forward
0 new messages