diff options
author | Abhijit Menon-Sen <ams@2ndQuadrant.com> | 2015-11-13 15:40:08 +0100 |
---|---|---|
committer | Abhijit Menon-Sen <ams@2ndQuadrant.com> | 2015-11-13 15:40:08 +0100 |
commit | 26ea9c4351536c6462a81c8dd0f685e11049ffaf (patch) | |
tree | b3c925522bc08365cb98f8d2d9ac6fed165eb0d0 | |
parent | Merge pull request #13146 from nitzmahone/gce_error_messaging (diff) | |
download | ansible-26ea9c4351536c6462a81c8dd0f685e11049ffaf.tar.xz ansible-26ea9c4351536c6462a81c8dd0f685e11049ffaf.zip |
If ssh died, it's an error, not a timeout
-rw-r--r-- | lib/ansible/plugins/connection/ssh.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index fc8b9a1105..202ce854bd 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -411,6 +411,10 @@ class Connection(ConnectionBase): if not rfd: if state <= states.index('awaiting_escalation'): + # If the process has already exited, then it's not really a + # timeout; we'll let the normal error handling deal with it. + if p.poll() is not None: + break self._terminate_process(p) raise AnsibleError('Timeout (%ds) waiting for privilege escalation prompt: %s' % (timeout, stdout)) |