diff --git a/lib/ansible/modules/cloud/amazon/ec2_asg.py b/lib/ansible/modules/cloud/amazon/ec2_asg.py index 8bc69f864b1..35f4d5630fb 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_asg.py +++ b/lib/ansible/modules/cloud/amazon/ec2_asg.py @@ -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)