FEATURE: systemd unit and timer added to schedule and run maintenance playbook

This commit is contained in:
2026-07-07 15:00:17 +00:00
parent 1e504ad18a
commit 6f996d1da3
2 changed files with 30 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
[Unit]
Description=Run Ansible playbook for daily maintenance
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
# CAHNGE TO MATCH YOUR REQUIREMENTS
User=max
Group=max
WorkingDirectory=/home/max/projects/ansible_home
ExecStart=/home/max/projects/ansible_home/run_playbook.sh /home/max/projects/ansible_home/playbooks/maintain.yaml
StandardOutput=journal
StandardError=journal
# Optional: prevent runaway if the playbook hangs
TimeoutStopSec=3600
[Install]
WantedBy=multi-user.target