Fix dnsmasq reboot cron: use /etc/cron.d/ instead of crontab

Ansible cron module writes to root's crontab which requires cron
daemon running. Drop file in /etc/cron.d/ instead for reliability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-03-26 15:03:09 -04:00
parent b7cd0974f1
commit 163e58ab0b

View File

@@ -620,11 +620,11 @@
policy: deny policy: deny
- name: "Schedule dnsmasq restart 15s after reboot" - name: "Schedule dnsmasq restart 15s after reboot"
cron: copy:
name: "Restart dnsmasq after reboot" dest: /etc/cron.d/dnsmasq-restart
user: root mode: '0644'
special_time: "reboot" content: |
job: "/bin/sleep 15 && /usr/bin/systemctl restart dnsmasq.service" @reboot root /bin/sleep 15 && /usr/bin/systemctl restart dnsmasq.service
# --- Web Management App (Flask) --- # --- Web Management App (Flask) ---
- name: "Create webapp directory" - name: "Create webapp directory"