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
e81c9766
Commit
e81c9766
authored
Nov 19, 2013
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pep8 errors in unarchive module
parent
52032b80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
lib/ansible/runner/action_plugins/unarchive.py
+4
-4
library/files/unarchive
+2
-2
No files found.
lib/ansible/runner/action_plugins/unarchive.py
View file @
e81c9766
...
...
@@ -55,14 +55,14 @@ class ActionModule(object):
source
=
template
.
template
(
self
.
runner
.
basedir
,
source
,
inject
)
if
'_original_file'
in
inject
:
source
=
utils
.
path_dwim_relative
(
inject
[
'_original_file'
],
'files'
,
source
,
self
.
runner
.
basedir
)
source
=
utils
.
path_dwim_relative
(
inject
[
'_original_file'
],
'files'
,
source
,
self
.
runner
.
basedir
)
else
:
source
=
utils
.
path_dwim
(
self
.
runner
.
basedir
,
source
)
source
=
utils
.
path_dwim
(
self
.
runner
.
basedir
,
source
)
remote_md5
=
self
.
runner
.
_remote_md5
(
conn
,
tmp
,
dest
)
if
remote_md5
!=
'3'
:
result
=
dict
(
failed
=
True
,
msg
=
"dest must be an existing dir"
)
return
ReturnData
(
conn
=
conn
,
result
=
result
)
result
=
dict
(
failed
=
True
,
msg
=
"dest must be an existing dir"
)
return
ReturnData
(
conn
=
conn
,
result
=
result
)
# transfer the file to a remote tmp location
tmp_src
=
tmp
+
'source'
...
...
library/files/unarchive
View file @
e81c9766
...
...
@@ -96,7 +96,7 @@ class _tgzfile(object):
def
is_unarchived
(
self
):
dirof
=
os
.
path
.
dirname
(
self
.
dest
)
destbase
=
os
.
path
.
basename
(
self
.
dest
)
cmd
=
'tar -v -C "
%
s" --diff -
%
sf "
%
s"'
%
(
self
.
dest
,
self
.
zipflag
,
self
.
src
)
cmd
=
'tar -v -C "
%
s" --diff -
%
sf "
%
s"'
%
(
self
.
dest
,
self
.
zipflag
,
self
.
src
)
rc
,
out
,
err
=
self
.
module
.
run_command
(
cmd
)
bool
=
True
if
rc
==
0
else
False
return
dict
(
bool
=
bool
,
rc
=
rc
,
out
=
out
,
err
=
err
,
cmd
=
cmd
)
...
...
@@ -138,7 +138,7 @@ class _tarxz(_tgzfile):
self
.
zipflag
=
'J'
# try handlers in order and return the one that works or bail if none work
def
pick_handler
(
src
,
dest
,
module
):
def
pick_handler
(
src
,
dest
,
module
):
handlers
=
[
_tgzfile
,
_zipfile
,
_tarfile
,
_tarbzip
,
_tarxz
]
for
handler
in
handlers
:
obj
=
handler
(
src
,
dest
,
module
)
...
...
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