Merge branch '2-compose-update'

This commit is contained in:
Jeff Geerling 2017-05-03 11:11:16 -05:00
commit 3ae29c13ab
4 changed files with 24 additions and 6 deletions

View File

@ -18,6 +18,7 @@ The Docker package to install.
docker_install_compose: true docker_install_compose: true
docker_compose_version: "1.11.2" docker_compose_version: "1.11.2"
docker_compose_path: /usr/local/bin/docker-compose
Docker Compose installation options. Docker Compose installation options.

View File

@ -3,7 +3,8 @@ docker_package: "docker-engine"
# Docker Compose options. # Docker Compose options.
docker_install_compose: true docker_install_compose: true
docker_compose_version: "1.11.2" docker_compose_version: "1.13.0"
docker_compose_path: /usr/local/bin/docker-compose
# Used only for Debian/Ubuntu. Add 'testing' if you don't want stable. # Used only for Debian/Ubuntu. Add 'testing' if you don't want stable.
docker_apt_repository: "deb https://apt.dockerproject.org/repo {{ ansible_distribution|lower }}-{{ ansible_distribution_release }} main" docker_apt_repository: "deb https://apt.dockerproject.org/repo {{ ansible_distribution|lower }}-{{ ansible_distribution_release }} main"

20
tasks/docker-compose.yml Normal file
View File

@ -0,0 +1,20 @@
---
- name: Check current docker-compose version.
command: docker-compose --version
register: docker_compose_current_version
changed_when: false
failed_when: false
- name: Delete existing docker-compose version if it's different.
file:
path: "{{ docker_compose_path }}"
state: absent
when: >
docker_compose_current_version.stdout is defined
and docker_compose_version not in docker_compose_current_version.stdout
- name: Install Docker Compose (if configured).
get_url:
url: https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64
dest: "{{ docker_compose_path }}"
mode: 0755

View File

@ -14,9 +14,5 @@
state: started state: started
enabled: yes enabled: yes
- name: Install Docker Compose (if configured). - include: docker-compose.yml
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
when: docker_install_compose when: docker_install_compose