Only fetch docker-compose if current version is not the desired version

This commit is contained in:
slicen 2021-03-12 23:47:48 +11:00
parent a977b06b7b
commit c2f737d5a2

View File

@ -1,6 +1,6 @@
---
- name: Check current docker-compose version.
command: docker-compose --version
command: "{{ docker_compose_path }} --version"
register: docker_compose_current_version
changed_when: false
failed_when: false
@ -18,3 +18,6 @@
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