Adding logrotate for mongo.

This commit is contained in:
Samuel Clay 2021-06-29 17:51:14 -04:00
parent 58c11935ee
commit 17e6f7f424
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,10 @@
/var/log/mongodb/*.log {
weekly
rotate 10
size 256M
copytruncate
delaycompress
compress
notifempty
missingok
}

View file

@ -53,6 +53,11 @@
notify:
- reload consul
- name: Setup logrotate for mongo
become: yes
copy: src=logrotate.conf dest=/etc/logrotate.d/mongodb mode=0755
tags: logrotate
- name: Add sanity checkers cronjob for disk usage
become: yes
cron: