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
40336b50
Commit
40336b50
authored
Jun 10, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed redundant string check
added playbook path lookup
parent
7306a539
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
lib/ansible/plugins/lookup/file.py
+3
-6
No files found.
lib/ansible/plugins/lookup/file.py
View file @
40336b50
...
...
@@ -27,9 +27,6 @@ class LookupModule(LookupBase):
def
run
(
self
,
terms
,
variables
=
None
,
**
kwargs
):
if
not
isinstance
(
terms
,
list
):
terms
=
[
terms
]
ret
=
[]
for
term
in
terms
:
basedir_path
=
self
.
_loader
.
path_dwim
(
term
)
...
...
@@ -43,13 +40,13 @@ class LookupModule(LookupBase):
# itself (which will be relative to the current working dir)
if
'role_path'
in
variables
:
relative_path
=
self
.
_loader
.
path_dwim_relative
(
variables
[
'role_path'
],
'files'
,
term
,
check
=
False
)
relative_path
=
self
.
_loader
.
path_dwim_relative
(
variables
[
'role_path'
],
'files'
,
term
)
# FIXME: the original file stuff still needs to be worked out, but the
# playbook_dir stuff should be able to be removed as it should
# be covered by the fact that the loader contains that info
#
if 'playbook_dir' in variables:
# playbook_path = os.path.join(variables['playbook_dir']
, term)
if
'playbook_dir'
in
variables
:
playbook_path
=
self
.
_loader
.
path_dwim_relative
(
variables
[
'playbook_dir'
],
'files'
,
term
)
for
path
in
(
basedir_path
,
relative_path
,
playbook_path
):
try
:
...
...
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