parent
a8dd389383
commit
8d05ef4654
3 changed files with 22 additions and 3 deletions
@ -1,3 +1,4 @@ |
||||
--- |
||||
|
||||
docker_compose_version: 1.25.5 |
||||
docker_compose_version: 1.29.2 |
||||
docker_compose_bin_sha256: f3f10cf3dbb8107e9ba2ea5f23c1d2159ff7321d16f0a23051d68d8e2547b323 |
||||
|
@ -1,10 +1,28 @@ |
||||
--- |
||||
|
||||
- name: Check if docker-compose is installed |
||||
stat: path=/usr/local/bin/docker-compose |
||||
register: docker_compose_bin |
||||
tags: docker |
||||
|
||||
- name: Detect docker-compose version |
||||
shell: docker-compose -v | perl -ne '/version (\d+(\.\d+)+),/ && print "$1\n"' |
||||
register: docker_compose_current_version |
||||
changed_when: False |
||||
when: docker_compose_bin.stat.exists |
||||
tags: docker |
||||
|
||||
- name: Remove docker-compose |
||||
file: path=/usr/local/bin/docker-compose state=absent |
||||
when: docker_compose_bin.stat.exists and docker_compose_current_version.stdout != docker_compose_version |
||||
tags: docker |
||||
|
||||
- name: Install docker-compose |
||||
get_url: |
||||
url: https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64 |
||||
dest: /usr/local/bin/docker-compose |
||||
mode: 0755 |
||||
checksum: sha256:{{ docker_compose_bin_sha256 }} |
||||
environment: |
||||
- https_proxy: "{{ system_proxy | default('') }}" |
||||
tags: docker |
||||
|
Loading…
Reference in new issue