mirror of
https://github.com/ThunixdotNet/ansible.git
synced 2026-01-25 05:40:17 +00:00
Move start and end inside the function
This commit is contained in:
@@ -5,9 +5,11 @@ export SCHED="/dev/shm/ansible_scheduler"
|
|||||||
|
|
||||||
ansible_is_running()
|
ansible_is_running()
|
||||||
{
|
{
|
||||||
|
touch $RUNNING
|
||||||
cd /var/thunix/ansible
|
cd /var/thunix/ansible
|
||||||
/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
|
||||||
|
rm $RUNNING
|
||||||
}
|
}
|
||||||
|
|
||||||
# sets ansible scheduling
|
# sets ansible scheduling
|
||||||
@@ -19,9 +21,7 @@ else
|
|||||||
while [ -f $SCHED ]
|
while [ -f $SCHED ]
|
||||||
do
|
do
|
||||||
rm $SCHED
|
rm $SCHED
|
||||||
touch $RUNNING
|
|
||||||
ansible_is_running
|
ansible_is_running
|
||||||
touch $HOOK
|
touch $HOOK
|
||||||
rm $RUNNING
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user