mirror of
https://github.com/ThunixdotNet/ansible.git
synced 2026-01-24 13:40:17 +00:00
Move touch command inside the while loop
This commit is contained in:
@@ -9,11 +9,11 @@ touch $SCHED
|
|||||||
if [ -f $RUNNING ]; then
|
if [ -f $RUNNING ]; then
|
||||||
echo "Ansible is currently running."
|
echo "Ansible is currently running."
|
||||||
else
|
else
|
||||||
touch $RUNNING
|
|
||||||
cd /var/thunix/ansible
|
cd /var/thunix/ansible
|
||||||
while [ -f $SCHED ]
|
while [ -f $SCHED ]
|
||||||
do
|
do
|
||||||
rm $SCHED
|
rm $SCHED
|
||||||
|
touch $RUNNING
|
||||||
/usr/bin/git pull
|
/usr/bin/git pull
|
||||||
/usr/local/bin/ansible-playbook -i /var/thunix/ansible/hosts /var/thunix/ansible/site.yml -u root
|
/usr/local/bin/ansible-playbook -i /var/thunix/ansible/hosts /var/thunix/ansible/site.yml -u root
|
||||||
touch $HOOK
|
touch $HOOK
|
||||||
|
|||||||
Reference in New Issue
Block a user