mirror of
https://github.com/ThunixdotNet/ansible.git
synced 2026-01-24 13:40:17 +00:00
updating the perms on cron tasks, adding systemd units, and adding the hook logics
This commit is contained in:
7
roles/common/files/ansible-run
Normal file
7
roles/common/files/ansible-run
Normal 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
|
||||
6
roles/common/files/ansible-run.path
Normal file
6
roles/common/files/ansible-run.path
Normal file
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=ansible-run path
|
||||
[Path]
|
||||
PathModified=/dev/shm/run-ansible
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
4
roles/common/files/ansible-run.service
Normal file
4
roles/common/files/ansible-run.service
Normal file
@@ -0,0 +1,4 @@
|
||||
[Unit]
|
||||
Description=ansible-run
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/ansible-run
|
||||
Reference in New Issue
Block a user