From 9180fbe7e5e83f7eebb9da8d7ca1e81e37fb1b06 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Wed, 3 May 2017 11:06:24 -0500 Subject: [PATCH] Issue #2: Allow customization of the Docker Compose path. --- README.md | 1 + defaults/main.yml | 1 + tasks/docker-compose.yml | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de1372a..13af257 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ The Docker package to install. docker_install_compose: true docker_compose_version: "1.11.2" + docker_compose_path: /usr/local/bin/docker-compose Docker Compose installation options. diff --git a/defaults/main.yml b/defaults/main.yml index 9771cf3..2283fb9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,6 +4,7 @@ docker_package: "docker-engine" # Docker Compose options. docker_install_compose: true 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. docker_apt_repository: "deb https://apt.dockerproject.org/repo {{ ansible_distribution|lower }}-{{ ansible_distribution_release }} main" diff --git a/tasks/docker-compose.yml b/tasks/docker-compose.yml index 5b0857a..92cf4f2 100644 --- a/tasks/docker-compose.yml +++ b/tasks/docker-compose.yml @@ -7,7 +7,7 @@ - name: Delete existing docker-compose version if it's different. file: - path: /usr/local/bin/docker-compose + path: "{{ docker_compose_path }}" state: absent when: > docker_compose_current_version.stdout is defined @@ -16,5 +16,5 @@ - 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: /usr/local/bin/docker-compose + dest: "{{ docker_compose_path }}" mode: 0755