ansible-role-docker/tasks/docker-compose.yml
slicen a977b06b7b Adds option to configure docker-compose URL
Necessary for installing from a local mirror or in an offline environmment.
2021-03-12 23:44:42 +11:00

21 lines
591 B
YAML

---
- name: Check current docker-compose version.
command: docker-compose --version
register: docker_compose_current_version
changed_when: false
failed_when: false
- name: Delete existing docker-compose version if it's different.
file:
path: "{{ docker_compose_path }}"
state: absent
when: >
docker_compose_current_version.stdout is defined
and docker_compose_version not in docker_compose_current_version.stdout
- name: Install Docker Compose (if configured).
get_url:
url: "{{ docker_compose_url }}"
dest: "{{ docker_compose_path }}"
mode: 0755