Add playbooks/cron.yml

This commit is contained in:
2026-06-13 13:40:17 +01:00
parent a938474d5b
commit f1ccba2294

18
playbooks/cron.yml Normal file
View File

@@ -0,0 +1,18 @@
- name: modify crontab
hosts: apache-intranet
become: true
tasks:
- name: create crontab cleanup entry
lineinfile:
path: /etc/crontab
line: '30 4 * * * root /usr/bin/rm /var/www/files/* 2>/dev/null'
state: present
- name: create crontab entry to run sysctl reload at boot
lineinfile:
path: /etc/crontab
line: '@reboot root /usr/sbin/sysctl -p'
state: present