mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-09 14:50:02 -07:00
ecs_taskdefinition can absent without containers argument (#41398)
* ecs_taskdefinition can absent without containers argument * add regression test for absent with arn * Add PassRole privilege for ecs_cluster to pass
This commit is contained in:
parent
e4c28571d0
commit
7e42e88cc1
3 changed files with 29 additions and 4 deletions
|
@ -654,6 +654,20 @@
|
|||
# ============================================================
|
||||
# End tests for Fargate
|
||||
|
||||
- name: create task definition for absent with arn regression test
|
||||
ecs_taskdefinition:
|
||||
containers: "{{ ecs_task_containers }}"
|
||||
family: "{{ ecs_task_name }}-absent"
|
||||
state: present
|
||||
<<: *aws_connection_info
|
||||
register: ecs_task_definition_absent_with_arn
|
||||
|
||||
- name: absent task definition by arn
|
||||
ecs_taskdefinition:
|
||||
arn: "{{ ecs_task_definition_absent_with_arn.taskdefinition.taskDefinitionArn }}"
|
||||
state: absent
|
||||
<<: *aws_connection_info
|
||||
|
||||
always:
|
||||
# TEAR DOWN: snapshot, ec2 instance, ec2 key pair, security group, vpc
|
||||
- name: Announce teardown start
|
||||
|
@ -795,6 +809,15 @@
|
|||
<<: *aws_connection_info
|
||||
ignore_errors: yes
|
||||
|
||||
- name: remove ecs task definition for absent with arn
|
||||
ecs_taskdefinition:
|
||||
containers: "{{ ecs_task_containers }}"
|
||||
family: "{{ ecs_task_name }}-absent"
|
||||
revision: "{{ ecs_task_definition_absent_with_arn.taskdefinition.revision }}"
|
||||
state: absent
|
||||
<<: *aws_connection_info
|
||||
ignore_errors: yes
|
||||
|
||||
- name: remove load balancer
|
||||
elb_application_lb:
|
||||
name: "{{ ecs_load_balancer_name }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue