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
389602b8
Commit
389602b8
authored
Nov 15, 2013
by
Matt Haggard
Committed by
James Tanner
Nov 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge pull request #4920 from iffy/ansible
Collect all stdout over ssh transport before returning data
parent
441cd1c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
lib/ansible/runner/connection_plugins/ssh.py
+7
-7
No files found.
lib/ansible/runner/connection_plugins/ssh.py
View file @
389602b8
...
...
@@ -216,8 +216,9 @@ class Connection(object):
# We can't use p.communicate here because the ControlMaster may have stdout open as well
stdout
=
''
stderr
=
''
rpipes
=
[
p
.
stdout
,
p
.
stderr
]
while
True
:
rfd
,
wfd
,
efd
=
select
.
select
(
[
p
.
stdout
,
p
.
stderr
],
[],
[
p
.
stdout
,
p
.
stderr
]
,
1
)
rfd
,
wfd
,
efd
=
select
.
select
(
rpipes
,
[],
rpipes
,
1
)
# fail early if the sudo password is wrong
if
self
.
runner
.
sudo
and
sudoable
and
self
.
runner
.
sudo_pass
:
...
...
@@ -230,15 +231,14 @@ class Connection(object):
dat
=
os
.
read
(
p
.
stdout
.
fileno
(),
9000
)
stdout
+=
dat
if
dat
==
''
:
p
.
wait
()
break
elif
p
.
stderr
in
rfd
:
rpipes
.
remove
(
p
.
stdout
)
if
p
.
stderr
in
rfd
:
dat
=
os
.
read
(
p
.
stderr
.
fileno
(),
9000
)
stderr
+=
dat
if
dat
==
''
:
p
.
wait
(
)
break
elif
p
.
poll
()
is
not
None
:
rpipes
.
remove
(
p
.
stderr
)
if
not
rpipes
or
p
.
poll
()
is
not
None
:
p
.
wait
()
break
stdin
.
close
()
# close stdin after we read from stdout (see also issue #848)
...
...
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