From 74d7dba8ec918ccd673fe123aed08d13e6ede970 Mon Sep 17 00:00:00 2001 From: jowj Date: Sat, 2 Jun 2018 11:36:48 -0500 Subject: [PATCH] Change previous running container check to Shell from Command ansible module. --- deployments/mojo.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deployments/mojo.yml b/deployments/mojo.yml index 959f81f..9c76431 100644 --- a/deployments/mojo.yml +++ b/deployments/mojo.yml @@ -9,6 +9,7 @@ - name: Build from the latest version command: cd ~/mojojojo-bot && docker build -t mojo -f docker/dockerfile . - name: Check if there are any existing mojo containers running and kill it - command: docker ps | grep 'mojo' | awk '{print $1}' | xargs docker kill + # this has to be a shell because command: isn't interactive + shell: docker ps | grep 'mojo' | awk '{print $1}' | xargs docker kill - name: Run the newly built docker container command: docker container run -e "SLACK_BOT_TOKEN={{ VAULT_SLACK_BOT_TOKEN }}" --restart "always" -d mojo \ No newline at end of file