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
830225d9
Commit
830225d9
authored
May 12, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix errors in subelements lookup plugin and associated tests (v2)
parent
4d999f8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/ansible/plugins/lookup/subelements.py
+2
-2
test/integration/roles/test_iterators/tasks/main.yml
+1
-1
No files found.
lib/ansible/plugins/lookup/subelements.py
View file @
830225d9
...
...
@@ -33,8 +33,8 @@ class LookupModule(LookupBase):
raise
errors
.
AnsibleError
(
"subelements lookup expects a list of two or three items, "
+
msg
)
terms
=
listify_lookup_plugin_terms
(
terms
,
self
.
basedir
,
inject
)
terms
[
0
]
=
listify_lookup_plugin_terms
(
terms
[
0
],
self
.
basedir
,
inject
)
terms
=
listify_lookup_plugin_terms
(
terms
,
variables
,
loader
=
self
.
_loader
)
terms
[
0
]
=
listify_lookup_plugin_terms
(
terms
[
0
],
variables
,
loader
=
self
.
_loader
)
# check lookup terms - check number of terms
if
not
isinstance
(
terms
,
list
)
or
not
2
<=
len
(
terms
)
<=
3
:
...
...
test/integration/roles/test_iterators/tasks/main.yml
View file @
830225d9
...
...
@@ -119,7 +119,7 @@
-
skip_missing
:
yes
register
:
_subelements_missing_subkeys
-
debug
:
var=_subelements_missing_subkeys
.skipped
-
debug
:
var=_subelements_missing_subkeys
-
debug
:
var=_subelements_missing_subkeys.results|length
-
name
:
verify with_subelements in subkeys results
assert
:
...
...
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