cloudformation stack events itertools.imap bugfix (#4868)

pull/18777/head
mzizzi 8 years ago committed by Matt Clay
parent 91cc160b43
commit eaef333215

@ -203,28 +203,28 @@ def stack_operation(cfn, stack_name, operation):
if 'yes' in existed: if 'yes' in existed:
result = dict(changed=True, result = dict(changed=True,
output='Stack Deleted', output='Stack Deleted',
events=map(str, list(stack.describe_events()))) events=list(map(str, list(stack.describe_events()))))
else: else:
result = dict(changed= True, output='Stack Not Found') result = dict(changed= True, output='Stack Not Found')
break break
if '%s_COMPLETE' % operation == stack.stack_status: if '%s_COMPLETE' % operation == stack.stack_status:
result = dict(changed=True, result = dict(changed=True,
events = map(str, list(stack.describe_events())), events = list(map(str, list(stack.describe_events()))),
output = 'Stack %s complete' % operation) output = 'Stack %s complete' % operation)
break break
if 'ROLLBACK_COMPLETE' == stack.stack_status or '%s_ROLLBACK_COMPLETE' % operation == stack.stack_status: if 'ROLLBACK_COMPLETE' == stack.stack_status or '%s_ROLLBACK_COMPLETE' % operation == stack.stack_status:
result = dict(changed=True, failed=True, result = dict(changed=True, failed=True,
events = map(str, list(stack.describe_events())), events = list(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=True, failed=True, result = dict(changed=True, failed=True,
events = map(str, list(stack.describe_events())), events = list(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: elif '%s_ROLLBACK_FAILED' % operation == stack.stack_status:
result = dict(changed=True, failed=True, result = dict(changed=True, failed=True,
events = map(str, list(stack.describe_events())), events = list(map(str, list(stack.describe_events()))),
output = 'Stack %s rollback failed' % operation) output = 'Stack %s rollback failed' % operation)
break break
else: else:

Loading…
Cancel
Save