I'm trying to set a couple of environment variables in an ECS task, however these never seem to be passed (nor are any errors thrown).
Is this feature broken? I have tried numerous times but nothing seems to work.
Using: Ansible v2.9.6 aws-cli v1.16.162 Python v2.7.5
e.g.
- name: Create task def
ecs_taskdefinition:
revision: 1
launch_type: FARGATE
cpu: 256
memory: 512
network_mode: awsvpc
state: present
family: simpsons
execution_role_arn: "arn:aws:iam::XXXXXXXXXXXXXX:role/ecsTaskExecutionRole"
region: "{{ aws_region }}"
aws_access_key: "{{ ecs_access_key }}"
aws_secret_key: "{{ ecs_secret_key }}"
containers:
- name: "{{ maven_artifact_id }}"
image: "XXXXXXXXXXXXXX.dkr.ecr.eu-west-1.amazonaws.com/REPO:TAG"
environment:
- name: "PORT"
value: "443"
essential: true
logConfiguration:
logDriver: "awslogs"
options:
awslogs-group: "/ecs/test-cluster-taskdef"
awslogs-region: "us-west-2"
awslogs-stream-prefix: "ecs"