diff --git a/playbooks/cron.yml b/playbooks/cron.yml new file mode 100644 index 0000000..ff00f6f --- /dev/null +++ b/playbooks/cron.yml @@ -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 \ No newline at end of file