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

ecs_taskdefinition module : proposal : add force_create: true parameter (#23480)

* ecs_taskdefinition module : add `force_create: true` parameter
This commit is contained in:
Takuya Sato 2018-01-03 22:56:19 +09:00 committed by Sloane Hertel
parent 605243f41f
commit a323521e46

View file

@ -46,6 +46,11 @@ options:
description:
- A revision number for the task definition
required: False
force_create:
description:
- Always create new task definition
required: False
version_added: 2.5
containers:
description:
- A list of containers definitions
@ -220,6 +225,7 @@ def main():
arn=dict(required=False, type='str'),
family=dict(required=False, type='str'),
revision=dict(required=False, type='int'),
force_create=dict(required=False, default=False, type='bool'),
containers=dict(required=False, type='list'),
network_mode=dict(required=False, default='bridge', choices=['bridge', 'host', 'none'], type='str'),
task_role_arn=dict(required=False, default='', type='str'),
@ -343,7 +349,7 @@ def main():
if existing:
break
if existing:
if existing and not module.params.get('force_create'):
# Awesome. Have an existing one. Nothing to do.
results['taskdefinition'] = existing
else: