diff --git a/tasks/docker-compose.yml b/tasks/docker-compose.yml index 27c788b..1dee81d 100644 --- a/tasks/docker-compose.yml +++ b/tasks/docker-compose.yml @@ -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