mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
committed by
Brian Coca
parent
24593f2ffb
commit
907ff2f26c
@@ -1067,6 +1067,13 @@ class StrategyBase:
|
||||
if host.name not in self._tqm._unreachable_hosts:
|
||||
iterator._host_states[host.name].run_state = iterator.ITERATING_COMPLETE
|
||||
msg = "ending play"
|
||||
elif meta_action == 'end_host':
|
||||
if _evaluate_conditional(target_host):
|
||||
iterator._host_states[target_host.name].run_state = iterator.ITERATING_COMPLETE
|
||||
msg = "ending play for %s" % target_host.name
|
||||
else:
|
||||
skipped = True
|
||||
msg = "end_host conditional evaluated to false, continuing execution for %s" % target_host.name
|
||||
elif meta_action == 'reset_connection':
|
||||
all_vars = self._variable_manager.get_vars(play=iterator._play, host=target_host, task=task)
|
||||
templar = Templar(loader=self._loader, variables=all_vars)
|
||||
|
||||
@@ -265,7 +265,7 @@ class StrategyModule(StrategyBase):
|
||||
# for the linear strategy, we run meta tasks just once and for
|
||||
# all hosts currently being iterated over rather than one host
|
||||
results.extend(self._execute_meta(task, play_context, iterator, host))
|
||||
if task.args.get('_raw_params', None) not in ('noop', 'reset_connection'):
|
||||
if task.args.get('_raw_params', None) not in ('noop', 'reset_connection', 'end_host'):
|
||||
run_once = True
|
||||
if (task.any_errors_fatal or run_once) and not task.ignore_errors:
|
||||
any_errors_fatal = True
|
||||
|
||||
Reference in New Issue
Block a user