Skip to content

Commit

Permalink
Remove needless get_next_task_for_host calls (#74174)
Browse files Browse the repository at this point in the history
Called with `peek=True` and the return values are not used.

ci_complete
  • Loading branch information
mkrizek committed Apr 28, 2021
1 parent 7099657 commit 68accca
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/ansible/plugins/strategy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,7 @@ def search_handler_blocks_by_name(handler_name, handler_blocks):
# 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)

Expand Down

0 comments on commit 68accca

Please sign in to comment.