From 68accca9957eedacc0ce64a88bd5176e2f606483 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Wed, 28 Apr 2021 13:19:37 +0200 Subject: [PATCH] Remove needless get_next_task_for_host calls (#74174) Called with `peek=True` and the return values are not used. ci_complete --- lib/ansible/plugins/strategy/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py index ae20aea53c7..1bfe04e47cf 100644 --- a/lib/ansible/plugins/strategy/__init__.py +++ b/lib/ansible/plugins/strategy/__init__.py @@ -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)