mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Don't skip conditional exception on includes (#39377)
* task_executor.py: Raise 'conditional exception' in case of 'include_*' Fixes #33632 Signed-off-by: Patrick Ringl <patrick_@freenet.de> * Re-organize tests, add static include test with undefined var * Remove unnecessary conditional
This commit is contained in:
@@ -471,9 +471,7 @@ class TaskExecutor:
|
||||
# loop error takes precedence
|
||||
if self._loop_eval_error is not None:
|
||||
raise self._loop_eval_error # pylint: disable=raising-bad-type
|
||||
# skip conditional exception in the case of includes as the vars needed might not be available except in the included tasks or due to tags
|
||||
if self._task.action not in ['include', 'include_tasks', 'include_role']:
|
||||
raise
|
||||
raise
|
||||
|
||||
# Not skipping, if we had loop error raised earlier we need to raise it now to halt the execution of this task
|
||||
if self._loop_eval_error is not None:
|
||||
|
||||
Reference in New Issue
Block a user