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
2f39d37a
Commit
2f39d37a
authored
Sep 23, 2013
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expand destination path in the fetch action
Fixes #4215
parent
a6d62ef5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
lib/ansible/runner/action_plugins/fetch.py
+4
-1
No files found.
lib/ansible/runner/action_plugins/fetch.py
View file @
2f39d37a
...
@@ -56,6 +56,8 @@ class ActionModule(object):
...
@@ -56,6 +56,8 @@ class ActionModule(object):
results
=
dict
(
failed
=
True
,
msg
=
"src and dest are required"
)
results
=
dict
(
failed
=
True
,
msg
=
"src and dest are required"
)
return
ReturnData
(
conn
=
conn
,
result
=
results
)
return
ReturnData
(
conn
=
conn
,
result
=
results
)
source
=
os
.
path
.
expanduser
(
source
)
if
flat
:
if
flat
:
if
dest
.
endswith
(
"/"
):
if
dest
.
endswith
(
"/"
):
# if the path ends with "/", we'll use the source filename as the
# if the path ends with "/", we'll use the source filename as the
...
@@ -68,7 +70,8 @@ class ActionModule(object):
...
@@ -68,7 +70,8 @@ class ActionModule(object):
else
:
else
:
# files are saved in dest dir, with a subdir for each host, then the filename
# files are saved in dest dir, with a subdir for each host, then the filename
dest
=
"
%
s/
%
s/
%
s"
%
(
utils
.
path_dwim
(
self
.
runner
.
basedir
,
dest
),
conn
.
host
,
source
)
dest
=
"
%
s/
%
s/
%
s"
%
(
utils
.
path_dwim
(
self
.
runner
.
basedir
,
dest
),
conn
.
host
,
source
)
dest
=
dest
.
replace
(
"//"
,
"/"
)
dest
=
os
.
path
.
expanduser
(
dest
.
replace
(
"//"
,
"/"
))
# calculate md5 sum for the remote file
# calculate md5 sum for the remote file
remote_md5
=
self
.
runner
.
_remote_md5
(
conn
,
tmp
,
source
)
remote_md5
=
self
.
runner
.
_remote_md5
(
conn
,
tmp
,
source
)
...
...
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