Merge pull request #384 from berthin/master

Fix condition for empty docker compose svn
This commit is contained in:
Jeff Geerling 2022-11-05 14:21:48 -05:00 committed by GitHub
commit 9154e3bf75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,9 @@
- set_fact:
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.
file:
@ -25,5 +27,5 @@
mode: 0755
when: >
(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', '')), '<'))