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
e8751baa
Commit
e8751baa
authored
Mar 14, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove remote log function as it's only used in one place now
parent
696b67f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
lib/ansible/runner.py
+3
-9
No files found.
lib/ansible/runner.py
View file @
e8751baa
...
...
@@ -451,19 +451,13 @@ class Runner(object):
# *****************************************************
def
remote_log
(
self
,
conn
,
msg
):
''' this is the function we use to log things '''
# FIXME: TODO: make this optional as it's executed a lot
stdin
,
stdout
,
stderr
=
conn
.
exec_command
(
'/usr/bin/logger -t ansible -p auth.info "
%
s"'
%
msg
)
# *****************************************************
def
_exec_command
(
self
,
conn
,
cmd
):
''' execute a command string over SSH, return the output '''
msg
=
'
%
s:
%
s'
%
(
self
.
module_name
,
cmd
)
self
.
remote_log
(
conn
,
msg
)
# log remote command execution
conn
.
exec_command
(
'/usr/bin/logger -t ansible -p auth.info "
%
s"'
%
msg
)
# now run actual command
stdin
,
stdout
,
stderr
=
conn
.
exec_command
(
cmd
)
return
"
\n
"
.
join
(
stdout
.
readlines
())
...
...
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