mirror of
https://github.com/Maks1mS/ansible-role-docker.git
synced 2024-12-24 16:44:41 +03:00
21 lines
673 B
YAML
21 lines
673 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: https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64
|
|
dest: "{{ docker_compose_path }}"
|
|
mode: 0755
|