mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00: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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user