summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Coca <bcoca@ansible.com>2015-11-13 10:45:21 -0800
committerBrian Coca <bcoca@ansible.com>2015-11-13 10:45:21 -0800
commit634e10e5b81486c65e091a37f35e4942054590ea (patch)
treea005b2521bf6b7f79b6d78aaba5da557af271ab3
parent49651221be25a0773e2e2e61f7a8399fc7a2e967 (diff)
parent26ea9c4351536c6462a81c8dd0f685e11049ffaf (diff)
downloadansible-634e10e5b81486c65e091a37f35e4942054590ea.tar.gz
Merge pull request #13156 from amenonsen/broken-timeout
If ssh died, it's an error, not a timeout
-rw-r--r--lib/ansible/plugins/connection/ssh.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py
index b5cce048e3..8bbc031271 100644
--- a/lib/ansible/plugins/connection/ssh.py
+++ b/lib/ansible/plugins/connection/ssh.py
@@ -414,6 +414,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))