mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
listify lookup plugin terms when they're specified as "{{ lookup(terms) }}"
Before this, they were not listified there but they were listified when specified like this: with_lookup: terms
This commit is contained in:
parent
e32d887609
commit
d35b956900
23 changed files with 16 additions and 50 deletions
|
@ -25,7 +25,7 @@ from ansible.utils.listify import listify_lookup_plugin_terms
|
|||
|
||||
class LookupModule(LookupBase):
|
||||
|
||||
def __lookup_variables(self, terms, variables):
|
||||
def _lookup_variables(self, terms, variables):
|
||||
foo = variables.copy()
|
||||
foo.pop('vars')
|
||||
results = []
|
||||
|
@ -39,7 +39,7 @@ class LookupModule(LookupBase):
|
|||
|
||||
def run(self, terms, variables=None, **kwargs):
|
||||
|
||||
terms = self.__lookup_variables(terms, variables)
|
||||
terms = self._lookup_variables(terms, variables)
|
||||
|
||||
my_list = terms[:]
|
||||
my_list.reverse()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue