mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-28 07:31:23 -07:00
Don't fail outright when a play has an empty hosts list
This commit is contained in:
parent
605ddad37e
commit
4b28a51f25
2 changed files with 1 additions and 3 deletions
|
@ -120,7 +120,6 @@ class PlaybookExecutor:
|
||||||
if len(batch) == 0:
|
if len(batch) == 0:
|
||||||
self._tqm.send_callback('v2_playbook_on_play_start', new_play)
|
self._tqm.send_callback('v2_playbook_on_play_start', new_play)
|
||||||
self._tqm.send_callback('v2_playbook_on_no_hosts_matched')
|
self._tqm.send_callback('v2_playbook_on_no_hosts_matched')
|
||||||
result = 1
|
|
||||||
break
|
break
|
||||||
# restrict the inventory to the hosts in the serialized batch
|
# restrict the inventory to the hosts in the serialized batch
|
||||||
self._inventory.restrict_to_hosts(batch)
|
self._inventory.restrict_to_hosts(batch)
|
||||||
|
|
|
@ -122,9 +122,8 @@ class StrategyModule(StrategyBase):
|
||||||
moving on to the next task
|
moving on to the next task
|
||||||
'''
|
'''
|
||||||
|
|
||||||
result = True
|
|
||||||
|
|
||||||
# iteratate over each task, while there is one left to run
|
# iteratate over each task, while there is one left to run
|
||||||
|
result = True
|
||||||
work_to_do = True
|
work_to_do = True
|
||||||
while work_to_do and not self._tqm._terminated:
|
while work_to_do and not self._tqm._terminated:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue