Add playbooks/cron.yml
This commit is contained in:
18
playbooks/cron.yml
Normal file
18
playbooks/cron.yml
Normal 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
|
||||
Reference in New Issue
Block a user