updating the perms on cron tasks, adding systemd units, and adding the hook logics

This commit is contained in:
Ubergeek
2019-03-18 12:53:49 +00:00
parent 2ff36ad615
commit 7265a116f4
4 changed files with 52 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
#!/bin/bash
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
rm /dev/shm/run-ansible
touch /dev/shm/ansible-hook-last-run

View File

@@ -0,0 +1,6 @@
[Unit]
Description=ansible-run path
[Path]
PathModified=/dev/shm/run-ansible
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,4 @@
[Unit]
Description=ansible-run
[Service]
ExecStart=/usr/local/bin/ansible-run