mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Add option to fail on undefined variables to listify
And use it in the call to get the loop items for a task.
This commit is contained in:
@@ -143,7 +143,7 @@ class TaskExecutor:
|
||||
|
||||
items = None
|
||||
if self._task.loop and self._task.loop in lookup_loader:
|
||||
loop_terms = listify_lookup_plugin_terms(terms=self._task.loop_args, variables=self._job_vars, loader=self._loader)
|
||||
loop_terms = listify_lookup_plugin_terms(terms=self._task.loop_args, variables=self._job_vars, loader=self._loader, fail_on_undefined=True)
|
||||
items = lookup_loader.get(self._task.loop, loader=self._loader).run(terms=loop_terms, variables=self._job_vars)
|
||||
|
||||
return items
|
||||
|
||||
Reference in New Issue
Block a user