From c21c6a7f55319f36ec3ef720a9940bb77ded2c6d Mon Sep 17 00:00:00 2001 From: Naglfar Date: Sat, 5 Dec 2020 18:09:03 +0100 Subject: [PATCH] replace last run variable --- roles/common/files/ansible-run | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/roles/common/files/ansible-run b/roles/common/files/ansible-run index 1e69089..fd215ea 100644 --- a/roles/common/files/ansible-run +++ b/roles/common/files/ansible-run @@ -1,5 +1,6 @@ #!/bin/bash export RUNNING="/dev/shm/ansible_is_running" +export HOOK="/dev/shm/ansible-hook-last-run" ansible_is_running() { @@ -10,11 +11,9 @@ ansible_is_running() if [ -f $RUNNING ]; then echo "Ansible is currently running." - exit 1 else touch $RUNNING ansible_is_running - touch /dev/shm/ansible-hook-last-run + touch $HOOK rm $RUNNING - exit 0 fi