mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
[cloud] Skip StackPolicy when operating on ChangeSets in CloudFormation module (#33401)
Really, the Policy only works on 'create' and 'update'. (rm my outdated comments too)
This commit is contained in:
@@ -5,13 +5,6 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
# upcoming features:
|
||||
# - Ted's multifile YAML concatenation
|
||||
# - changesets (and blocking/waiting for them)
|
||||
# - finish AWSRetry conversion
|
||||
# - move create/update code out of main
|
||||
# - unit tests
|
||||
|
||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||
'status': ['stableinterface'],
|
||||
'supported_by': 'core'}
|
||||
@@ -540,10 +533,9 @@ def main():
|
||||
stack_params['NotificationARNs'] = []
|
||||
|
||||
# can't check the policy when verifying.
|
||||
if module.params['stack_policy'] is not None and not module.check_mode:
|
||||
if module.params['stack_policy'] is not None and not module.check_mode and not module.params['create_changeset']:
|
||||
stack_params['StackPolicyBody'] = open(module.params['stack_policy'], 'r').read()
|
||||
|
||||
|
||||
template_parameters = module.params['template_parameters']
|
||||
stack_params['Parameters'] = [{'ParameterKey':k, 'ParameterValue':str(v)} for k, v in template_parameters.items()]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user