Handle the case where a stack rollback fails.

This commit is contained in:
Jan Brauer 2015-01-21 13:36:36 +01:00 committed by Matt Clay
parent ef140a084a
commit af689dece3

View file

@ -191,6 +191,11 @@ def stack_operation(cfn, stack_name, operation):
events = map(str, list(stack.describe_events())),
output = 'Stack %s failed' % operation)
break
elif '%s_ROLLBACK_FAILED' % operation == stack.stack_status:
result = dict(changed=True, failed=True,
events = map(str, list(stack.describe_events())),
output = 'Stack %s rollback failed' % operation)
break
else:
time.sleep(5)
return result