It seems that the ssh connection plugin ignores the timeout setting from ansible.
Are we supposed to set the timeout in ansible_ssh_args? (something like ConnectTimeout=10)
When I ran this on several machines previously, I only got the “FAILED => failed to transfer” message,
not the following “ssh: connect…” message.
See below for example. I’m dropping input packets on lo to simulate an unresponsive host.
~$ time ansible localhost -m command -a ‘echo bob’ -T 10 -c ssh
localhost | FAILED => failed to transfer file to /command:
Connecting to localhost…
ssh: connect to host localhost port 22: Connection timed out
Couldn’t read packet: Connection reset by peer
real 2m6.876s
user 0m0.784s
sys 0m0.113s
$ ansible --version
ansible 1.0 (devel e166f71fcc) last updated 2013/01/28 16:31:44 (GMT -700)