From 94c7a2ef017c669366e2aa2a653dd3c0cfdbbd6c Mon Sep 17 00:00:00 2001 From: Naglfar Date: Thu, 10 Dec 2020 16:45:00 +0100 Subject: [PATCH] Remove non essential function --- roles/common/files/ansible-run | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/roles/common/files/ansible-run b/roles/common/files/ansible-run index 1dda298..b1da10b 100644 --- a/roles/common/files/ansible-run +++ b/roles/common/files/ansible-run @@ -3,13 +3,6 @@ export RUNNING="/dev/shm/ansible_is_running" export HOOK="/dev/shm/ansible-hook-last-run" export SCHED="/dev/shm/ansible_scheduler" -ansible_is_running() -{ - cd /var/thunix/ansible - /usr/bin/git pull - /usr/local/bin/ansible-playbook -i /var/thunix/ansible/hosts /var/thunix/ansible/site.yml -u root -} - # sets ansible scheduling touch $SCHED @@ -17,10 +10,12 @@ if [ -f $RUNNING ]; then echo "Ansible is currently running." else touch $RUNNING + cd /var/thunix/ansible while [ -f $SCHED ] do rm $SCHED - ansible_is_running + /usr/bin/git pull + /usr/local/bin/ansible-playbook -i /var/thunix/ansible/hosts /var/thunix/ansible/site.yml -u root touch $HOOK done rm $RUNNING