Merge "Install docker-compose using pip"

This commit is contained in:
Zuul 2022-01-11 09:50:52 +00:00 committed by Gerrit Code Review
commit 0c2c28fb3a
3 changed files with 13 additions and 1 deletions

View File

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

View File

@ -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

View File

@ -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