Browse Source

Merge "Install docker-compose using pip"

changes/98/823998/4
Zuul 4 months ago committed by Gerrit Code Review
parent
commit
0c2c28fb3a
  1. 1
      playbooks/docker/pre.yaml
  2. 2
      roles/tobiko-ensure-docker-compose/defaults/main.yaml
  3. 11
      roles/tobiko-ensure-docker-compose/tasks/main.yaml

1
playbooks/docker/pre.yaml

@ -3,6 +3,7 @@
- hosts: all
roles:
- role: ensure-docker
- role: tobiko-ensure-python3
- role: tobiko-ensure-docker-compose
- role: tobiko-docker-compose
vars:

2
roles/tobiko-ensure-docker-compose/defaults/main.yaml

@ -1,3 +1,5 @@
---
docker_compose_executable: /usr/local/bin/docker-compose
docker_compose_install_using_pip: true
docker_compose_install_using_curl: not docker_compose_install_using_pip

11
roles/tobiko-ensure-docker-compose/tasks/main.yaml

@ -1,6 +1,14 @@
---
- name: "Install latest Docker compose"
- name: "Install latest Docker compose with Pip"
become: true
shell: |
set -x
python3 -m pip install docker-compose
when: docker_compose_install_using_pip
- name: "Install latest Docker compose with Curl"
become: true
shell: |
set -x
@ -15,3 +23,4 @@
mkdir -p $(dirname '{{ docker_compose_executable }}')
curl -L ${URL} > '{{ docker_compose_executable }}'
chmod +x '{{ docker_compose_executable }}'
when: docker_compose_install_using_curl

Loading…
Cancel
Save