From ab49c85d984b2821cd98e608e72db8018b65b776 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Wed, 3 May 2017 10:59:50 -0500 Subject: [PATCH] Issue #2: Only use variable if it's defined. --- tasks/docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/docker-compose.yml b/tasks/docker-compose.yml index 5b4fb8e..5b0857a 100644 --- a/tasks/docker-compose.yml +++ b/tasks/docker-compose.yml @@ -9,7 +9,9 @@ file: path: /usr/local/bin/docker-compose state: absent - when: docker_compose_version not in docker_compose_current_version.stdout + 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: