This Ansible role allows users thereof to install the AWS ECS Agent on Ubuntu-based instances typically running inside of an AWS environment. This may be a requirement for some people who might not want to use the ECS-Optimized AMI from Amazon, or who may feel more comfortable working inside of Ubuntu-based environments exclusively.
- Ansible 2.5+
- Tested on Ubuntu 14.04, 16.04 and 18.04
Please consult http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html for detailed information regarding the options below.
ubuntu_ecs_agent_loglevel
:ECS_LOGLEVEL
(Default: info)ubuntu_ecs_agent_cluster_name
:ECS_CLUSTER
(Default: default)ubuntu_ecs_agent_enable_iam_role
:ECS_ENABLE_TASK_IAM_ROLE
(Default: true)ubuntu_ecs_agent_enable_task_iam_role_network_host
:ECS_ENABLE_TASK_IAM_ROLE_NETWORK_HOST
(Default: true)ubuntu_ecs_agent_reserved_ports
:ECS_RESERVED_PORTS
(Default: "[22, 2375, 2376, 51678]")ubuntu_ecs_agent_container_stop_timeout
:ECS_CONTAINER_STOP_TIMEOUT
(Default: 30s)ubuntu_ecs_agent_auth_type
:ECS_ENGINE_AUTH_TYPE
(Default: "")ubuntu_ecs_agent_auth_data
:ECS_ENGINE_AUTH_DATA
(Default: "")ubuntu_ecs_agent_start_mode
: Set to "docker" or "systemd", depending how you would like to start the agent container (Default: "docker")
---
- name: test-playbook | Test ubuntu-ecs-agent role
hosts: all
become: yes
vars:
- ubuntu_ecs_agent_cluster_name: TestCluster
roles:
- ecs-agent
Run it with python3 interpreter in newer distributions like this:
ansible-playbook site.yml -i ec2-13-236-6-185.ap-southeast-2.compute.amazonaws.com, -e 'ansible_python_interpreter=/usr/bin/python3'
Licensed under the MIT License. See the LICENSE file for details.