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
65f5bed3
Commit
65f5bed3
authored
Sep 23, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12493 from amenonsen/ssh-fds
Fix typo in checking select results
parents
1164e834
40f608a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
lib/ansible/plugins/connection/ssh.py
+7
-5
No files found.
lib/ansible/plugins/connection/ssh.py
View file @
65f5bed3
...
...
@@ -460,19 +460,19 @@ class Connection(ConnectionBase):
# Read whatever output is available on stdout and stderr, and stop
# listening to the pipe if it's been closed.
el
if
p
.
stdout
in
rfd
:
if
p
.
stdout
in
rfd
:
chunk
=
p
.
stdout
.
read
()
if
chunk
==
''
:
rpipes
.
remove
(
p
.
stdout
)
tmp_stdout
+=
chunk
#
self._display.debug("stdout chunk (state=%s):\n>>>%s<<<\n" % (state, chunk))
self
.
_display
.
debug
(
"stdout chunk (state=
%
s):
\n
>>>
%
s<<<
\n
"
%
(
state
,
chunk
))
el
if
p
.
stderr
in
rfd
:
if
p
.
stderr
in
rfd
:
chunk
=
p
.
stderr
.
read
()
if
chunk
==
''
:
rpipes
.
remove
(
p
.
stderr
)
tmp_stderr
+=
chunk
#
self._display.debug("stderr chunk (state=%s):\n>>>%s<<<\n" % (state, chunk))
self
.
_display
.
debug
(
"stderr chunk (state=
%
s):
\n
>>>
%
s<<<
\n
"
%
(
state
,
chunk
))
# We examine the output line-by-line until we have negotiated any
# privilege escalation prompt and subsequent success/error message.
...
...
@@ -578,7 +578,7 @@ class Connection(ConnectionBase):
just hang forever waiting for more commands.)
'''
self
.
_display
.
debug
(
'Sending initial data
(
%
d bytes)'
%
len
(
in_data
)
)
self
.
_display
.
debug
(
'Sending initial data
'
)
try
:
fh
.
write
(
in_data
)
...
...
@@ -586,6 +586,8 @@ class Connection(ConnectionBase):
except
(
OSError
,
IOError
):
raise
AnsibleConnectionFailure
(
'SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh'
)
self
.
_display
.
debug
(
'Sent initial data (
%
d bytes)'
%
len
(
in_data
))
# This is a separate method because we need to do the same thing for stdout
# and stderr.
...
...
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