mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Don't swallow exceptions when processing included files (#54791)
* Don't swallow exceptions when processing included files. Fixes #54786
This commit is contained in:
@@ -893,15 +893,12 @@ class StrategyBase:
|
||||
# collect the results from the handler run
|
||||
host_results = self._wait_on_handler_results(iterator, handler, notified_hosts)
|
||||
|
||||
try:
|
||||
included_files = IncludedFile.process_include_results(
|
||||
host_results,
|
||||
iterator=iterator,
|
||||
loader=self._loader,
|
||||
variable_manager=self._variable_manager
|
||||
)
|
||||
except AnsibleError:
|
||||
return False
|
||||
included_files = IncludedFile.process_include_results(
|
||||
host_results,
|
||||
iterator=iterator,
|
||||
loader=self._loader,
|
||||
variable_manager=self._variable_manager
|
||||
)
|
||||
|
||||
result = True
|
||||
if len(included_files) > 0:
|
||||
|
||||
@@ -202,15 +202,12 @@ class StrategyModule(StrategyBase):
|
||||
|
||||
self.update_active_connections(results)
|
||||
|
||||
try:
|
||||
included_files = IncludedFile.process_include_results(
|
||||
host_results,
|
||||
iterator=iterator,
|
||||
loader=self._loader,
|
||||
variable_manager=self._variable_manager
|
||||
)
|
||||
except AnsibleError as e:
|
||||
return self._tqm.RUN_ERROR
|
||||
included_files = IncludedFile.process_include_results(
|
||||
host_results,
|
||||
iterator=iterator,
|
||||
loader=self._loader,
|
||||
variable_manager=self._variable_manager
|
||||
)
|
||||
|
||||
if len(included_files) > 0:
|
||||
all_blocks = dict((host, []) for host in hosts_left)
|
||||
|
||||
@@ -324,16 +324,12 @@ class StrategyModule(StrategyBase):
|
||||
|
||||
self.update_active_connections(results)
|
||||
|
||||
try:
|
||||
included_files = IncludedFile.process_include_results(
|
||||
host_results,
|
||||
iterator=iterator,
|
||||
loader=self._loader,
|
||||
variable_manager=self._variable_manager
|
||||
)
|
||||
except AnsibleError as e:
|
||||
# this is a fatal error, so we abort here regardless of block state
|
||||
return self._tqm.RUN_ERROR
|
||||
included_files = IncludedFile.process_include_results(
|
||||
host_results,
|
||||
iterator=iterator,
|
||||
loader=self._loader,
|
||||
variable_manager=self._variable_manager
|
||||
)
|
||||
|
||||
include_failure = False
|
||||
if len(included_files) > 0:
|
||||
|
||||
Reference in New Issue
Block a user