ansible playbook to install docker EE on ubuntu 16.04
references:
- https://docs.docker.com/install/linux/docker-ee/ubuntu/#install-docker-ee
- https://docs.docker.com/install/linux/linux-postinstall/
-
dockerEE_ubuntu.yml: main playbook
-
dockerEE_creds.yml: contains dockerEE-related variables
-
dockerEE_ubuntu_addon.yml: additional tasks for docker group and systemctl setup
step 1: edit /etc/ansible/hosts with list of ubuntu nodes and proper python_interpreter variable - sample extract below
[ubuntuaws2]
10.1.1.10
10.1.1.11
10.1.1.12
[ubuntuaws2:vars]
ansible_python_interpreter=/usr/bin/python3
step 2: rename dockerEE_creds_sample.yml to dockerEE_creds.yml
step 3: update content of dockerEE_creds.yml with appropriate data
step 4: check host reachability / ssh keys
ansible -m ping ubuntuaws2 --user=ubuntu --private-key=mykey.pem
step 4: run the playbooks
ansible-playbook dockerEE_ubuntu.yml --user=ubuntu --private-key=mykey.pem --become
ansible-playbook dockerEE_ubuntu_addon.yml --user=ubuntu --private-key=mykey.pem --become
note: in first playbook "--become" option overlaps with use of task-based become - due to missing option in apt_key
Then, the next step is to install UCP on master node:
https://docs.docker.com/ee/end-to-end-install/#step-2-install-universal-control-plane