mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07: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:
parent
1cc86167dd
commit
61cc8b2356
1 changed files with 1 additions and 9 deletions
|
@ -5,13 +5,6 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__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',
|
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
'status': ['stableinterface'],
|
'status': ['stableinterface'],
|
||||||
'supported_by': 'core'}
|
'supported_by': 'core'}
|
||||||
|
@ -540,10 +533,9 @@ def main():
|
||||||
stack_params['NotificationARNs'] = []
|
stack_params['NotificationARNs'] = []
|
||||||
|
|
||||||
# can't check the policy when verifying.
|
# 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()
|
stack_params['StackPolicyBody'] = open(module.params['stack_policy'], 'r').read()
|
||||||
|
|
||||||
|
|
||||||
template_parameters = module.params['template_parameters']
|
template_parameters = module.params['template_parameters']
|
||||||
stack_params['Parameters'] = [{'ParameterKey':k, 'ParameterValue':str(v)} for k, v in template_parameters.items()]
|
stack_params['Parameters'] = [{'ParameterKey':k, 'ParameterValue':str(v)} for k, v in template_parameters.items()]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue