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
|
||||
|
||||
- name: "Schedule dnsmasq restart 15s after reboot"
|
||||
cron:
|
||||
name: "Restart dnsmasq after reboot"
|
||||
user: root
|
||||
special_time: "reboot"
|
||||
job: "/bin/sleep 15 && /usr/bin/systemctl restart dnsmasq.service"
|
||||
copy:
|
||||
dest: /etc/cron.d/dnsmasq-restart
|
||||
mode: '0644'
|
||||
content: |
|
||||
@reboot root /bin/sleep 15 && /usr/bin/systemctl restart dnsmasq.service
|
||||
|
||||
# --- Web Management App (Flask) ---
|
||||
- name: "Create webapp directory"
|
||||
|
||||
Reference in New Issue
Block a user