Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
3f0e14c2
Commit
3f0e14c2
authored
Sep 09, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disabled ssh closing connections
parent
56d7f388
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
lib/ansible/plugins/connections/ssh.py
+8
-7
No files found.
lib/ansible/plugins/connections/ssh.py
View file @
3f0e14c2
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment