From 3f0e14c2a051200da1e87cacd715cb0b3ddd0525 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 9 Sep 2015 14:21:46 -0400 Subject: [PATCH] disabled ssh closing connections --- lib/ansible/plugins/connections/ssh.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/ansible/plugins/connections/ssh.py b/lib/ansible/plugins/connections/ssh.py index 80da729ea7b..38459cf7745 100644 --- a/lib/ansible/plugins/connections/ssh.py +++ b/lib/ansible/plugins/connections/ssh.py @@ -514,17 +514,18 @@ class Connection(ConnectionBase): raise AnsibleError("failed to transfer file from {0}:\n{1}\n{2}".format(in_path, stdout, stderr)) def close(self): - ''' not applicable since we're executing openssh binaries ''' if self._connected: - if 'ControlMaster' in self._common_args: - cmd = ['ssh','-O','stop'] - cmd.extend(self._common_args) - cmd.append(self._play_context.remote_addr) + # TODO: reenable once winrm issues are fixed + # temporarily disabled as we are forced to currently close connections after every task because of winrm + #if and 'ControlMaster' in self._common_args: + # cmd = ['ssh','-O','stop'] + # cmd.extend(self._common_args) + # cmd.append(self._play_context.remote_addr) - p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = p.communicate() + # p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # stdout, stderr = p.communicate() self._connected = False