mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-10 08:48:33 +01:00
add: emails & log rotation space saver
This commit is contained in:
@@ -56,4 +56,19 @@
|
||||
name: "check dirs"
|
||||
minute: "0"
|
||||
hour: "0"
|
||||
job: "/usr/bin/journalctl --vacuum-time=7d"
|
||||
job: "/usr/bin/journalctl --vacuum-time={{ keep_journal_for_days }}d"
|
||||
|
||||
- name: Remove mails in var-mail
|
||||
ansible.builtin.cron:
|
||||
name: "Cleanup local mails"
|
||||
minute: "0"
|
||||
hour: "0"
|
||||
job: "/usr/bin/rm -f /var/mail/*"
|
||||
|
||||
- name: Template Logrotate configs
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/logrotate/logrotate.d/"
|
||||
with_items:
|
||||
- daemon.conf
|
||||
- syslog.conf
|
||||
|
||||
Reference in New Issue
Block a user