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
e8ff3c43
Commit
e8ff3c43
authored
Jun 03, 2013
by
Peter Hudec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed first_available_file and roles support
for copy and template action
parent
48e13f5c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
lib/ansible/runner/action_plugins/copy.py
+6
-6
lib/ansible/runner/action_plugins/template.py
+1
-1
No files found.
lib/ansible/runner/action_plugins/copy.py
View file @
e8ff3c43
...
...
@@ -57,12 +57,12 @@ class ActionModule(object):
found
=
False
for
fn
in
inject
.
get
(
'first_available_file'
):
fn_orig
=
fn
fn
=
template
.
template
(
self
.
runner
.
basedir
,
fn
,
inject
)
fn
=
utils
.
path_dwim
(
self
.
runner
.
basedir
,
fn
)
if
not
os
.
path
.
exists
(
fn
)
and
'_original_file'
in
inject
:
fn
=
utils
.
path_dwim_relative
(
inject
[
'_original_file'
],
'files'
,
fn_orig
,
self
.
runner
.
basedir
,
check
=
False
)
if
os
.
path
.
exists
(
fn
):
source
=
fn
fn
t
=
template
.
template
(
self
.
runner
.
basedir
,
fn
,
inject
)
fn
d
=
utils
.
path_dwim
(
self
.
runner
.
basedir
,
fnt
)
if
not
os
.
path
.
exists
(
fn
d
)
and
'_original_file'
in
inject
:
fn
d
=
utils
.
path_dwim_relative
(
inject
[
'_original_file'
],
'files'
,
fnt
,
self
.
runner
.
basedir
,
check
=
False
)
if
os
.
path
.
exists
(
fn
d
):
source
=
fn
d
found
=
True
break
if
not
found
:
...
...
lib/ansible/runner/action_plugins/template.py
View file @
e8ff3c43
...
...
@@ -60,7 +60,7 @@ class ActionModule(object):
fnt
=
template
.
template
(
self
.
runner
.
basedir
,
fn
,
inject
)
fnd
=
utils
.
path_dwim
(
self
.
runner
.
basedir
,
fnt
)
if
not
os
.
path
.
exists
(
fnd
)
and
'_original_file'
in
inject
:
fnd
=
utils
.
path_dwim_relative
(
inject
[
'_original_file'
],
'templates'
,
fn
_orig
,
self
.
runner
.
basedir
,
check
=
False
)
fnd
=
utils
.
path_dwim_relative
(
inject
[
'_original_file'
],
'templates'
,
fn
t
,
self
.
runner
.
basedir
,
check
=
False
)
if
os
.
path
.
exists
(
fnd
):
source
=
fnd
found
=
True
...
...
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