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
3ebbb564
Commit
3ebbb564
authored
Aug 01, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3654 from MaxIV-KitsControls/devel
Fix nested loop for more than 3 elements
parents
422233bc
09ef7751
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
+10
-1
lib/ansible/runner/lookup_plugins/nested.py
+1
-1
test/lookup_plugins.yml
+9
-0
No files found.
lib/ansible/runner/lookup_plugins/nested.py
View file @
3ebbb564
...
@@ -34,7 +34,7 @@ def combine(a,b):
...
@@ -34,7 +34,7 @@ def combine(a,b):
results
=
[]
results
=
[]
for
x
in
a
:
for
x
in
a
:
for
y
in
b
:
for
y
in
b
:
results
.
append
(
[
x
,
y
]
)
results
.
append
(
flatten
([
x
,
y
])
)
return
results
return
results
class
LookupModule
(
object
):
class
LookupModule
(
object
):
...
...
test/lookup_plugins.yml
View file @
3ebbb564
...
@@ -55,6 +55,15 @@
...
@@ -55,6 +55,15 @@
action
:
copy src=sample.j2 dest=/tmp/ansible-test-with_lines-data
action
:
copy src=sample.j2 dest=/tmp/ansible-test-with_lines-data
-
name
:
cleanup test file
-
name
:
cleanup test file
action
:
file path=/tmp/ansible-test-with_lines-data state=absent
action
:
file path=/tmp/ansible-test-with_lines-data state=absent
# Test nested loop
-
name
:
test nested loop with more than 3 elements
command
:
test "{{ item[0] }}, {{ item[1] }}, {{ item[2] }}, {{ item[3] }}" = "red, 1, up, top"
with_nested
:
-
[
'
red'
]
-
[
1
]
-
[
'
up'
]
-
[
'
top'
]
# password lookup plugin
# password lookup plugin
-
name
:
ensure test file doesn't exist
-
name
:
ensure test file doesn't exist
...
...
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