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
81f55ff8
Commit
81f55ff8
authored
Feb 18, 2015
by
Dagobert Michelsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust leftovers from chroot
parent
9cf8c3a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
lib/ansible/runner/connection_plugins/zone.py
+5
-7
No files found.
lib/ansible/runner/connection_plugins/zone.py
View file @
81f55ff8
...
...
@@ -84,7 +84,7 @@ class Connection(object):
self
.
port
=
port
def
connect
(
self
,
port
=
None
):
''' connect to the
chroot
; nothing to do here '''
''' connect to the
zone
; nothing to do here '''
vvv
(
"THIS IS A LOCAL ZONE DIR"
,
host
=
self
.
zone
)
...
...
@@ -100,17 +100,15 @@ class Connection(object):
#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
,
sudo_user
=
None
,
sudoable
=
False
,
executable
=
None
,
in_data
=
None
,
su
=
None
,
su_user
=
None
):
''' run a command on the
chroot
'''
''' run a command on the
zone
'''
# XXX: TBD
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"
)
# XXX: Allow doing stuff as -l <user>
# We enter chroot as root so sudo stuff can be ignored
# We enter zone as root so sudo stuff can be ignored
if
executable
==
'/bin/sh'
:
executable
=
None
local_cmd
=
self
.
_generate_cmd
(
executable
,
cmd
)
...
...
@@ -143,7 +141,7 @@ class Connection(object):
raise
errors
.
AnsibleError
(
"failed to transfer file to
%
s"
%
out_path
)
def
put_file
(
self
,
in_path
,
out_path
):
''' transfer a file from local to
chroot
'''
''' transfer a file from local to
zone
'''
out_path
=
self
.
_normalize_path
(
out_path
,
self
.
get_zone_path
())
vvv
(
"PUT
%
s TO
%
s"
%
(
in_path
,
out_path
),
host
=
self
.
zone
)
...
...
@@ -151,7 +149,7 @@ class Connection(object):
self
.
_copy_file
(
in_path
,
out_path
)
def
fetch_file
(
self
,
in_path
,
out_path
):
''' fetch a file from
chroot
to local '''
''' fetch a file from
zone
to local '''
in_path
=
self
.
_normalize_path
(
in_path
,
self
.
get_zone_path
())
vvv
(
"FETCH
%
s TO
%
s"
%
(
in_path
,
out_path
),
host
=
self
.
zone
)
...
...
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