From 5ed34b9b42af71a737e7f9f8169263df02ae7b59 Mon Sep 17 00:00:00 2001 From: Dave Hatton Date: Thu, 21 Jun 2012 11:01:08 +0100 Subject: [PATCH] change STDOUT to PIPE to get ssh connection module working --- lib/ansible/runner/connection/ssh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/connection/ssh.py b/lib/ansible/runner/connection/ssh.py index f2d6ffe2d22..7224033a52b 100644 --- a/lib/ansible/runner/connection/ssh.py +++ b/lib/ansible/runner/connection/ssh.py @@ -76,7 +76,7 @@ class SSHConnection(object): sudo_output = '' ssh_cmd.append(sudocmd) p = subprocess.Popen(ssh_cmd, stdin=subprocess.PIPE, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + stdout=subprocess.PIPE, stderr=subprocess.PIPE) if self.runner.sudo_pass: fcntl.fcntl(p.stdout, fcntl.F_SETFL, fcntl.fcntl(p.stdout, fcntl.F_GETFL) | os.O_NONBLOCK) @@ -96,7 +96,7 @@ class SSHConnection(object): else: ssh_cmd.append(cmd) p = subprocess.Popen(ssh_cmd, stdin=subprocess.PIPE, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + stdout=subprocess.PIPE, stderr=subprocess.PIPE) # We can't use p.communicate here because the ControlMaster may have stdout open as well p.stdin.close()