Skip to content

Instantly share code, notes, and snippets.

@omgjlk
Created December 12, 2013 01:13
Show Gist options
  • Save omgjlk/7921645 to your computer and use it in GitHub Desktop.
Save omgjlk/7921645 to your computer and use it in GitHub Desktop.
diff --git a/lib/ansible/runner/connection_plugins/ssh.py b/lib/ansible/runner/con
index 68c6f17..e19193f 100644
--- a/lib/ansible/runner/connection_plugins/ssh.py
+++ b/lib/ansible/runner/connection_plugins/ssh.py
@@ -237,9 +237,10 @@ class Connection(object):
stderr += dat
if dat == '':
rpipes.remove(p.stderr)
- if not rpipes or p.poll() is not None:
- p.wait()
+ if (not rpipes or not rfd) and p.poll() is not None:
break
+ elif p.poll() == None:
+ p.wait()
stdin.close() # close stdin after we read from stdout (see also issue #84
if C.HOST_KEY_CHECKING and not_in_host_file:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment