Remove needless get_next_task_for_host calls (#74174)

Called with `peek=True` and the return values are not used.

ci_complete
This commit is contained in:
Martin Krizek 2021-04-28 13:19:37 +02:00 committed by GitHub
parent 7099657dd7
commit 68accca995
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -549,9 +549,7 @@ class StrategyBase:
# if we're using run_once, we have to fail every host here
for h in self._inventory.get_hosts(iterator._play.hosts):
if h.name not in self._tqm._unreachable_hosts:
state, _ = iterator.get_next_task_for_host(h, peek=True)
iterator.mark_host_failed(h)
state, new_task = iterator.get_next_task_for_host(h, peek=True)
else:
iterator.mark_host_failed(original_host)