mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Wait for the lifecycle hooks by matching states `Terminating:Wait` and `Terminating:Proceed` in addition to `Terminating`.
This commit is contained in:
committed by
Sloane Hertel
parent
357beeb7ae
commit
ffd1200948
@@ -1368,7 +1368,7 @@ def wait_for_term_inst(connection, term_instances):
|
||||
lifecycle = instance_facts[i]['lifecycle_state']
|
||||
health = instance_facts[i]['health_status']
|
||||
module.debug("Instance %s has state of %s,%s" % (i, lifecycle, health))
|
||||
if lifecycle == 'Terminating' or health == 'Unhealthy':
|
||||
if lifecycle.startswith('Terminating') or health == 'Unhealthy':
|
||||
count += 1
|
||||
time.sleep(10)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user