
We need newer docker-compose for functionality like stop_grace_period and the easiest way to get that is via pypi. To install from there we need pip. This also fixes pip3 to work on xenial which doesn't have a python3-distutils package. Change-Id: I5f5431cac7eb191f2f5443892292ca5a236fe1e6
35 lines
727 B
YAML
35 lines
727 B
YAML
- name: Create docker directory
|
|
become: yes
|
|
file:
|
|
state: directory
|
|
path: /etc/docker
|
|
|
|
- name: Install docker-ce from upstream
|
|
include: upstream.yaml
|
|
when: use_upstream_docker|bool
|
|
|
|
- name: Install docker-engine from distro
|
|
include: distro.yaml
|
|
when: not use_upstream_docker|bool
|
|
|
|
- name: reset ssh connection to pick up docker group
|
|
meta: reset_connection
|
|
|
|
# We install docker-compose from pypi to get features like
|
|
# stop_grace_period.
|
|
- name: Remove distro docker-compose
|
|
package:
|
|
name:
|
|
- docker-compose
|
|
state: absent
|
|
|
|
- name: ensure pip3 is installed
|
|
include_role:
|
|
name: pip3
|
|
|
|
- name: Install docker-compose
|
|
pip:
|
|
name: docker-compose
|
|
state: present
|
|
executable: pip3
|