summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Brauer <jan@jimdo.com>2015-01-21 13:36:36 +0100
committerJan Brauer <jan@jimdo.com>2015-01-21 13:36:36 +0100
commite2abbbefd7d654f7ee05e18828fc1d0d1427a67b (patch)
tree3f2935a6ce6ceef7549869838e7d3fdbb29aeea3
parentc81ab92b270a6a66879a964be7ff56166517b091 (diff)
downloadansible-modules-core-e2abbbefd7d654f7ee05e18828fc1d0d1427a67b.tar.gz
Handle the case where a stack rollback fails.
-rw-r--r--cloud/amazon/cloudformation.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cloud/amazon/cloudformation.py b/cloud/amazon/cloudformation.py
index b382e3f0..1f4d7791 100644
--- a/cloud/amazon/cloudformation.py
+++ b/cloud/amazon/cloudformation.py
@@ -185,6 +185,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