ansible-role-docker/tasks/docker-compose.yml
Kare Nuorteva f6cd0ed3f8 style: fix ansible-lint nit about truthy value
yaml: truthy value should be one of [false, true] (truthy)
roles/geerlingguy.docker/tasks/docker-compose.yml:5

Fixes geerlingguy/ansible-role-docker#325
2022-01-13 19:20:24 +02:00

25 lines
766 B
YAML

---
- name: Check current docker-compose version.
command: "{{ docker_compose_path }} --version"
register: docker_compose_current_version
check_mode: false
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
when: >
docker_compose_current_version.stdout is not defined
or docker_compose_version not in docker_compose_current_version.stdout