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
5cced79c
Commit
5cced79c
authored
Apr 22, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow variables to be used raw in with_nested
parent
fbea88b9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
lib/ansible/runner/lookup_plugins/nested.py
+10
-0
No files found.
lib/ansible/runner/lookup_plugins/nested.py
View file @
5cced79c
...
@@ -42,11 +42,21 @@ class LookupModule(object):
...
@@ -42,11 +42,21 @@ class LookupModule(object):
def
__init__
(
self
,
basedir
=
None
,
**
kwargs
):
def
__init__
(
self
,
basedir
=
None
,
**
kwargs
):
self
.
basedir
=
basedir
self
.
basedir
=
basedir
def
__lookup_injects
(
self
,
terms
,
inject
):
results
=
[]
for
x
in
terms
:
if
isinstance
(
x
,
basestring
)
and
x
in
inject
:
results
.
append
(
inject
[
x
])
else
:
results
.
append
(
x
)
return
results
def
run
(
self
,
terms
,
inject
=
None
,
**
kwargs
):
def
run
(
self
,
terms
,
inject
=
None
,
**
kwargs
):
# this code is common with 'items.py' consider moving to utils if we need it again
# this code is common with 'items.py' consider moving to utils if we need it again
terms
=
utils
.
listify_lookup_plugin_terms
(
terms
,
self
.
basedir
,
inject
)
terms
=
utils
.
listify_lookup_plugin_terms
(
terms
,
self
.
basedir
,
inject
)
terms
=
self
.
__lookup_injects
(
terms
,
inject
)
my_list
=
terms
[:]
my_list
=
terms
[:]
my_list
.
reverse
()
my_list
.
reverse
()
...
...
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