fixed listify for lookups, made sure convert_bare is only on with_

This commit is contained in:
Brian Coca 2015-08-11 16:38:42 -04:00
parent adb9d7e461
commit 6e825e8c22
3 changed files with 6 additions and 8 deletions

View file

@ -153,7 +153,8 @@ class TaskExecutor:
items = None
if self._task.loop:
if self._task.loop in self._shared_loader_obj.lookup_loader:
loop_terms = listify_lookup_plugin_terms(terms=self._task.loop_args, templar=templar, loader=self._loader, fail_on_undefined=True)
#TODO: remove convert_bare true and deprecate this in with_
loop_terms = listify_lookup_plugin_terms(terms=self._task.loop_args, templar=templar, loader=self._loader, fail_on_undefined=True, convert_bare=True)
items = self._shared_loader_obj.lookup_loader.get(self._task.loop, loader=self._loader, templar=templar).run(terms=loop_terms, variables=vars_copy)
else:
raise AnsibleError("Unexpected failure in finding the lookup named '%s' in the available lookup plugins" % self._task.loop)