johanmeiring.ubuntu-ecs-agent
ubuntu-ecs-agent
This Ansible role helps users install the AWS ECS Agent on Ubuntu-based instances, usually running in an AWS environment. This is useful for those who prefer not to use the ECS-Optimized AMI from Amazon or who feel more comfortable in Ubuntu environments.
Requirements
- Ansible 2.5 or higher
- Tested on Ubuntu versions 14.04, 16.04, and 18.04
Role Variables
For more details about the options below, visit http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html.
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" based on how you want to start the agent container (Default: "docker")
Dependencies
Example Playbook
---
- name: test-playbook | Test ubuntu-ecs-agent role
hosts: all
become: yes
vars:
- ubuntu_ecs_agent_cluster_name: TestCluster
roles:
- ecs-agent
Run this with the Python 3 interpreter on modern systems 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'
License
Licensed under the MIT License. See the LICENSE file for information.