1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix errors in subelements lookup plugin and associated tests (v2)

This commit is contained in:
James Cammarata 2015-05-12 15:09:03 -05:00
parent 4d999f8fe0
commit 830225d9c1
2 changed files with 3 additions and 3 deletions

View file

@ -33,8 +33,8 @@ class LookupModule(LookupBase):
raise errors.AnsibleError( raise errors.AnsibleError(
"subelements lookup expects a list of two or three items, " "subelements lookup expects a list of two or three items, "
+ msg) + msg)
terms = listify_lookup_plugin_terms(terms, self.basedir, inject) terms = listify_lookup_plugin_terms(terms, variables, loader=self._loader)
terms[0] = listify_lookup_plugin_terms(terms[0], self.basedir, inject) terms[0] = listify_lookup_plugin_terms(terms[0], variables, loader=self._loader)
# check lookup terms - check number of terms # check lookup terms - check number of terms
if not isinstance(terms, list) or not 2 <= len(terms) <= 3: if not isinstance(terms, list) or not 2 <= len(terms) <= 3:

View file

@ -119,7 +119,7 @@
- skip_missing: yes - skip_missing: yes
register: _subelements_missing_subkeys register: _subelements_missing_subkeys
- debug: var=_subelements_missing_subkeys.skipped - debug: var=_subelements_missing_subkeys
- debug: var=_subelements_missing_subkeys.results|length - debug: var=_subelements_missing_subkeys.results|length
- name: verify with_subelements in subkeys results - name: verify with_subelements in subkeys results
assert: assert: