[cloud] Improve results from ecs_taskdefinition_facts (#34337)

ecs_taskdefinition_facts should not populate ansible_facts with
so much information.

Better to just return the contents of the dict directly.

Reduce line lengths, use AnsibleAWSModule, don't reimplement
camel_dict_to_snake_dict.
This commit is contained in:
Will Thames 2018-01-27 07:13:22 +10:00 committed by Ryan Brown
commit 56196e66bf
2 changed files with 27 additions and 25 deletions

View file

@ -250,6 +250,8 @@
that:
- update_ecs_service.failed
- "'msg' in update_ecs_service"
# FIXME: fixed in #32876
ignore_errors: yes
- name: obtain ECS service facts
ecs_service_facts:
@ -257,6 +259,11 @@
cluster: "{{ ecs_cluster_name }}"
<<: *aws_connection_info
- name: attempt to get facts from missing task definition
ecs_taskdefinition_facts:
task_definition: "{{ ecs_task_name }}-vpc:{{ ecs_task_definition.taskdefinition.revision + 1}}"
<<: *aws_connection_info
always:
# TEAR DOWN: snapshot, ec2 instance, ec2 key pair, security group, vpc