Created
November 3, 2015 09:03
-
-
Save amenonsen/a8131bf563524f694186 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py | |
index 73689aa..77b1f8d 100644 | |
--- a/lib/ansible/plugins/connection/ssh.py | |
+++ b/lib/ansible/plugins/connection/ssh.py | |
@@ -404,6 +404,8 @@ class Connection(ConnectionBase): | |
if not rfd: | |
if state <= states.index('awaiting_escalation'): | |
+ if p.poll() is not None: | |
+ break | |
self._terminate_process(p) | |
raise AnsibleError('Timeout (%ds) waiting for privilege escalation prompt: %s' % (timeout, stdout)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment