Merge pull request #678 from Jimdo/handle-cfn-rollback-failure
Handle the case where a Cloudformation stack rollback fails.
This commit is contained in:
commit
415815ef45
1 changed files with 5 additions and 0 deletions
|
@ -191,6 +191,11 @@ def stack_operation(cfn, stack_name, operation):
|
||||||
events = map(str, list(stack.describe_events())),
|
events = map(str, list(stack.describe_events())),
|
||||||
output = 'Stack %s failed' % operation)
|
output = 'Stack %s failed' % operation)
|
||||||
break
|
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:
|
else:
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Reference in a new issue