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
7782923e
Commit
7782923e
authored
Jan 09, 2013
by
Daniel Hokka Zakrisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert #1818 but avoid double-dwim, fixing relative fileglob
parent
891b1e37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
lib/ansible/runner/action_plugins/copy.py
+3
-3
lib/ansible/utils/__init__.py
+1
-2
No files found.
lib/ansible/runner/action_plugins/copy.py
View file @
7782923e
...
...
@@ -56,9 +56,9 @@ class ActionModule(object):
if
not
found
:
results
=
dict
(
failed
=
True
,
msg
=
"could not find src in first_available_file list"
)
return
ReturnData
(
conn
=
conn
,
result
=
results
)
source
=
utils
.
template
(
self
.
runner
.
basedir
,
source
,
inject
)
source
=
utils
.
path_dwim
(
self
.
runner
.
basedir
,
source
)
else
:
source
=
utils
.
template
(
self
.
runner
.
basedir
,
source
,
inject
)
source
=
utils
.
path_dwim
(
self
.
runner
.
basedir
,
source
)
local_md5
=
utils
.
md5
(
source
)
if
local_md5
is
None
:
...
...
lib/ansible/utils/__init__.py
View file @
7782923e
...
...
@@ -170,7 +170,6 @@ def prepare_writeable_dir(tree):
def
path_dwim
(
basedir
,
given
):
'''
make relative paths work like folks expect.
if a relative path is provided, convert it to an absolute path.
'''
if
given
.
startswith
(
"/"
):
...
...
@@ -178,7 +177,7 @@ def path_dwim(basedir, given):
elif
given
.
startswith
(
"~/"
):
return
os
.
path
.
expanduser
(
given
)
else
:
return
os
.
path
.
abspath
(
os
.
path
.
join
(
basedir
,
given
)
)
return
os
.
path
.
join
(
basedir
,
given
)
def
json_loads
(
data
):
''' parse a JSON string and return a data structure '''
...
...
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