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:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user