summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenno Joy <bennojoy@gmail.com>2015-05-27 22:45:33 +0530
committerBenno Joy <bennojoy@gmail.com>2015-05-27 22:45:33 +0530
commit415815ef4581b2ca92b12218462e7e127ed0ac29 (patch)
treefef4ee2bb9b4384306fe3288de2ea135cd1b1155
parentbd7e3fc8ab3e03fcfd66eff69edd8efec3682c14 (diff)
parente2abbbefd7d654f7ee05e18828fc1d0d1427a67b (diff)
downloadansible-modules-core-415815ef4581b2ca92b12218462e7e127ed0ac29.tar.gz
Merge pull request #678 from Jimdo/handle-cfn-rollback-failure
Handle the case where a Cloudformation 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 39b6f81a..eb49f668 100644
--- a/cloud/amazon/cloudformation.py
+++ b/cloud/amazon/cloudformation.py
@@ -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