mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -07:00
Remove ECS policies from AWS compute policy
The compute policy was exceeding maximum size and contained policies that already exist in ecs-policy. Look up suitable AMIs rather than hardcode We don't want to maintain multiple image IDs for multiple regions so use ec2_ami_facts to set a suitable image ID Improve exception handling
This commit is contained in:
parent
fbcd6f8a65
commit
a60fe1946c
4 changed files with 15 additions and 57 deletions
|
@ -523,7 +523,7 @@ def main():
|
|||
network_configuration,
|
||||
module.params['launch_type'])
|
||||
except botocore.exceptions.ClientError as e:
|
||||
module.fail_json(msg=e.message)
|
||||
module.fail_json_aws(e, msg="Couldn't create service")
|
||||
|
||||
results['service'] = response
|
||||
|
||||
|
@ -548,7 +548,7 @@ def main():
|
|||
module.params['cluster']
|
||||
)
|
||||
except botocore.exceptions.ClientError as e:
|
||||
module.fail_json(msg=e.message)
|
||||
module.fail_json_aws(e, msg="Couldn't delete service")
|
||||
results['changed'] = True
|
||||
|
||||
elif module.params['state'] == 'deleting':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue