Wait for the lifecycle hooks by matching states `Terminating:Wait` and `Terminating:Proceed` in addition to `Terminating`.
This commit is contained in:
parent
357beeb7ae
commit
ffd1200948
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue