|
|
@ -120,17 +120,19 @@ class StrategyModule(StrategyBase):
|
|
|
|
(state, task) = iterator.get_next_task_for_host(host, peek=True)
|
|
|
|
(state, task) = iterator.get_next_task_for_host(host, peek=True)
|
|
|
|
display.debug("free host state: %s" % state, host=host_name)
|
|
|
|
display.debug("free host state: %s" % state, host=host_name)
|
|
|
|
display.debug("free host task: %s" % task, host=host_name)
|
|
|
|
display.debug("free host task: %s" % task, host=host_name)
|
|
|
|
if host_name not in self._tqm._unreachable_hosts and task:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# check if there is work to do, either there is a task or the host is still blocked which could
|
|
|
|
|
|
|
|
# mean that it is processing an include task and after its result is processed there might be
|
|
|
|
|
|
|
|
# more tasks to run
|
|
|
|
|
|
|
|
if (task or self._blocked_hosts.get(host_name, False)) and not self._tqm._unreachable_hosts.get(host_name, False):
|
|
|
|
|
|
|
|
display.debug("this host has work to do", host=host_name)
|
|
|
|
# set the flag so the outer loop knows we've still found
|
|
|
|
# set the flag so the outer loop knows we've still found
|
|
|
|
# some work which needs to be done
|
|
|
|
# some work which needs to be done
|
|
|
|
work_to_do = True
|
|
|
|
work_to_do = True
|
|
|
|
|
|
|
|
|
|
|
|
display.debug("this host has work to do", host=host_name)
|
|
|
|
if not self._tqm._unreachable_hosts.get(host_name, False) and task:
|
|
|
|
|
|
|
|
|
|
|
|
# check to see if this host is blocked (still executing a previous task)
|
|
|
|
# check to see if this host is blocked (still executing a previous task)
|
|
|
|
if (host_name not in self._blocked_hosts or not self._blocked_hosts[host_name]):
|
|
|
|
if not self._blocked_hosts.get(host_name, False):
|
|
|
|
|
|
|
|
|
|
|
|
display.debug("getting variables", host=host_name)
|
|
|
|
display.debug("getting variables", host=host_name)
|
|
|
|
task_vars = self._variable_manager.get_vars(play=iterator._play, host=host, task=task,
|
|
|
|
task_vars = self._variable_manager.get_vars(play=iterator._play, host=host, task=task,
|
|
|
|
_hosts=self._hosts_cache,
|
|
|
|
_hosts=self._hosts_cache,
|
|
|
|