mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2024-11-18 19:10:43 +01:00
Fix condition for empty docker compose svn
This commit is contained in:
parent
96eaae30e5
commit
3800fd2d42
@ -8,7 +8,9 @@
|
|||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
docker_compose_current_version: "{{ docker_compose_vsn.stdout | regex_search('(\\d+(\\.\\d+)+)') }}"
|
docker_compose_current_version: "{{ docker_compose_vsn.stdout | regex_search('(\\d+(\\.\\d+)+)') }}"
|
||||||
when: docker_compose_vsn.stdout is defined
|
when: >
|
||||||
|
docker_compose_vsn.stdout is defined
|
||||||
|
and (docker_compose_vsn.stdout | length > 0)
|
||||||
|
|
||||||
- name: Delete existing docker-compose version if it's different.
|
- name: Delete existing docker-compose version if it's different.
|
||||||
file:
|
file:
|
||||||
@ -25,5 +27,5 @@
|
|||||||
mode: 0755
|
mode: 0755
|
||||||
when: >
|
when: >
|
||||||
(docker_compose_current_version is not defined)
|
(docker_compose_current_version is not defined)
|
||||||
or (docker_compose_current_version|length == 0)
|
or (docker_compose_current_version | length == 0)
|
||||||
or (docker_compose_current_version is version((docker_compose_version | regex_replace('v', '')), '<'))
|
or (docker_compose_current_version is version((docker_compose_version | regex_replace('v', '')), '<'))
|
||||||
|
Loading…
Reference in New Issue
Block a user