mirror of
https://github.com/ThunixdotNet/ansible.git
synced 2026-01-25 05:40:17 +00:00
replace last run variable
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export RUNNING="/dev/shm/ansible_is_running"
|
export RUNNING="/dev/shm/ansible_is_running"
|
||||||
|
export HOOK="/dev/shm/ansible-hook-last-run"
|
||||||
|
|
||||||
ansible_is_running()
|
ansible_is_running()
|
||||||
{
|
{
|
||||||
@@ -10,11 +11,9 @@ ansible_is_running()
|
|||||||
|
|
||||||
if [ -f $RUNNING ]; then
|
if [ -f $RUNNING ]; then
|
||||||
echo "Ansible is currently running."
|
echo "Ansible is currently running."
|
||||||
exit 1
|
|
||||||
else
|
else
|
||||||
touch $RUNNING
|
touch $RUNNING
|
||||||
ansible_is_running
|
ansible_is_running
|
||||||
touch /dev/shm/ansible-hook-last-run
|
touch $HOOK
|
||||||
rm $RUNNING
|
rm $RUNNING
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user