From 04e89eb481d135c0f824aabd8b7af68cd93ec78a Mon Sep 17 00:00:00 2001 From: Naglfar Date: Mon, 16 Aug 2021 16:22:55 +0200 Subject: [PATCH] Move touch command inside the while loop --- roles/common/files/ansible-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/common/files/ansible-run b/roles/common/files/ansible-run index b1da10b..3671d65 100644 --- a/roles/common/files/ansible-run +++ b/roles/common/files/ansible-run @@ -9,11 +9,11 @@ touch $SCHED if [ -f $RUNNING ]; then echo "Ansible is currently running." else - touch $RUNNING cd /var/thunix/ansible while [ -f $SCHED ] do rm $SCHED + touch $RUNNING /usr/bin/git pull /usr/local/bin/ansible-playbook -i /var/thunix/ansible/hosts /var/thunix/ansible/site.yml -u root touch $HOOK