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
d9723069
Commit
d9723069
authored
Aug 24, 2015
by
objectified
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
align exec_command() definition with local.py
parent
3a5522a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
lib/ansible/plugins/connections/docker.py
+5
-12
No files found.
lib/ansible/plugins/connections/docker.py
View file @
d9723069
...
...
@@ -24,6 +24,8 @@ import subprocess
import
time
import
re
import
ansible.constants
as
C
from
ansible
import
errors
from
ansible.plugins.connections
import
ConnectionBase
...
...
@@ -88,25 +90,16 @@ class Connection(ConnectionBase):
return
self
def
exec_command
(
self
,
cmd
,
tmp_path
,
sudo_user
=
None
,
sudoable
=
False
,
executable
=
'/bin/sh'
,
in_data
=
None
,
su
=
None
,
su_user
=
None
):
def
exec_command
(
self
,
cmd
,
tmp_path
,
in_data
=
None
,
sudoable
=
False
):
""" Run a command on the local host """
super
(
Connection
,
self
)
.
exec_command
(
cmd
,
tmp_path
,
in_data
=
in_data
,
sudoable
=
sudoable
)
# Don't currently support su
if
su
or
su_user
:
raise
errors
.
AnsibleError
(
"Internal Error: this module does not "
"support running commands via su"
)
if
in_data
:
raise
errors
.
AnsibleError
(
"Internal Error: this module does not "
"support optimized module pipelining"
)
if
sudoable
and
sudo_user
:
raise
errors
.
AnsibleError
(
"Internal Error: this module does not "
"support running commands via sudo"
)
executable
=
C
.
DEFAULT_EXECUTABLE
.
split
()[
0
]
if
C
.
DEFAULT_EXECUTABLE
else
None
if
executable
:
local_cmd
=
[
self
.
docker_cmd
,
"exec"
,
self
.
_play_context
.
remote_addr
,
executable
,
'-c'
,
cmd
]
...
...
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