1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

CloudFormation: Allow failed changesets to gather stack_outputs (#43509)

This commit is contained in:
Rob St. Marie 2018-08-22 10:54:31 -07:00 committed by Ryan Brown
parent 8522e6420e
commit a8f2b8f5ab

View file

@ -382,8 +382,10 @@ def create_changeset(module, stack_params, cfn, events_limit):
elif newcs['Status'] == 'FAILED' and "The submitted information didn't contain changes" in newcs['StatusReason']:
cfn.delete_change_set(ChangeSetName=cs['Id'])
result = dict(changed=False,
output='Stack is already up-to-date, Change Set refused to create due to lack of changes.')
module.exit_json(**result)
output='The created Change Set did not contain any changes to this stack and was deleted.')
# a failed change set does not trigger any stack events so we just want to
# skip any further processing of result and just return it directly
return result
else:
break
# Lets not hog the cpu/spam the AWS API