Merge pull request #4300 from psvo/cloudformation_results_fix
Fail cloudformation operation when it is not completed successfully
This commit is contained in:
commit
b7da202b73
1 changed files with 2 additions and 2 deletions
|
@ -141,12 +141,12 @@ def stack_operation(cfn, stack_name, operation):
|
||||||
output = 'Stack %s complete' % operation)
|
output = 'Stack %s complete' % operation)
|
||||||
break
|
break
|
||||||
if '%s_ROLLBACK_COMPLETE' % operation == stack.stack_status:
|
if '%s_ROLLBACK_COMPLETE' % operation == stack.stack_status:
|
||||||
result = dict(changed=True,
|
result = dict(changed=True, failed=True,
|
||||||
events = map(str, list(stack.describe_events())),
|
events = map(str, list(stack.describe_events())),
|
||||||
output = 'Problem with %s. Rollback complete' % operation)
|
output = 'Problem with %s. Rollback complete' % operation)
|
||||||
break
|
break
|
||||||
elif '%s_FAILED' % operation == stack.stack_status:
|
elif '%s_FAILED' % operation == stack.stack_status:
|
||||||
result = dict(changed=False,
|
result = dict(changed=True, failed=True,
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue