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:
Toshio Kuratomi 2015-08-10 09:07:37 -07:00
parent e32d887609
commit d35b956900
23 changed files with 16 additions and 50 deletions

View file

@ -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()