diff options
author | Jan Brauer <jan@jimdo.com> | 2015-01-21 13:36:36 +0100 |
---|---|---|
committer | Jan Brauer <jan@jimdo.com> | 2015-01-21 13:36:36 +0100 |
commit | e2abbbefd7d654f7ee05e18828fc1d0d1427a67b (patch) | |
tree | 3f2935a6ce6ceef7549869838e7d3fdbb29aeea3 | |
parent | c81ab92b270a6a66879a964be7ff56166517b091 (diff) | |
download | ansible-modules-core-e2abbbefd7d654f7ee05e18828fc1d0d1427a67b.tar.gz |
Handle the case where a stack rollback fails.
-rw-r--r-- | cloud/amazon/cloudformation.py | 5 |
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 |