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
071978a2
Commit
071978a2
authored
Jun 20, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #493 from dhozac/ssh-merge-stdouterr
Merge stdout and stderr as that is what is expected
parents
12825eda
d08ba12a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/ansible/runner/connection/ssh.py
+4
-4
No files found.
lib/ansible/runner/connection/ssh.py
View file @
071978a2
...
@@ -76,13 +76,13 @@ class SSHConnection(object):
...
@@ -76,13 +76,13 @@ class SSHConnection(object):
sudo_output
=
''
sudo_output
=
''
ssh_cmd
.
append
(
sudocmd
)
ssh_cmd
.
append
(
sudocmd
)
p
=
subprocess
.
Popen
(
ssh_cmd
,
stdin
=
subprocess
.
PIPE
,
p
=
subprocess
.
Popen
(
ssh_cmd
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
if
self
.
runner
.
sudo_pass
:
if
self
.
runner
.
sudo_pass
:
fcntl
.
fcntl
(
p
.
stdout
,
fcntl
.
F_SETFL
,
fcntl
.
fcntl
(
p
.
stdout
,
fcntl
.
F_SETFL
,
fcntl
.
fcntl
(
p
.
stdout
,
fcntl
.
F_GETFL
)
|
os
.
O_NONBLOCK
)
fcntl
.
fcntl
(
p
.
stdout
,
fcntl
.
F_GETFL
)
|
os
.
O_NONBLOCK
)
while
not
sudo_output
.
endswith
(
prompt
):
while
not
sudo_output
.
endswith
(
prompt
):
rfd
,
wfd
,
efd
=
select
.
select
([
p
.
stdout
,
p
.
stderr
],
[],
rfd
,
wfd
,
efd
=
select
.
select
([
p
.
stdout
],
[],
[
p
.
stdout
,
p
.
stderr
],
self
.
runner
.
timeout
)
[
p
.
stdout
],
self
.
runner
.
timeout
)
if
p
.
stdout
in
rfd
:
if
p
.
stdout
in
rfd
:
chunk
=
p
.
stdout
.
read
()
chunk
=
p
.
stdout
.
read
()
if
not
chunk
:
if
not
chunk
:
...
@@ -97,7 +97,7 @@ class SSHConnection(object):
...
@@ -97,7 +97,7 @@ class SSHConnection(object):
ssh_cmd
.
append
(
cmd
)
ssh_cmd
.
append
(
cmd
)
p
=
subprocess
.
Popen
(
ssh_cmd
,
stdin
=
subprocess
.
PIPE
,
p
=
subprocess
.
Popen
(
ssh_cmd
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
return
(
p
.
stdin
,
p
.
stdout
,
p
.
stderr
)
return
(
p
.
stdin
,
p
.
stdout
,
''
)
def
put_file
(
self
,
in_path
,
out_path
):
def
put_file
(
self
,
in_path
,
out_path
):
''' transfer a file from local to remote '''
''' transfer a file from local to remote '''
...
...
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