Explorar el Código

Rotate selfoss logs

My selfoss logs were using 10GB of space because they weren't being rotated properly.
Justin Plock hace 10 años
padre
commit
e11f494183
Se han modificado 2 ficheros con 11 adiciones y 0 borrados
  1. 8
    0
      roles/news/files/etc_logrotate_selfoss
  2. 3
    0
      roles/news/tasks/selfoss.yml

+ 8
- 0
roles/news/files/etc_logrotate_selfoss Ver fichero

@@ -0,0 +1,8 @@
1
+/var/www/selfoss/data/logs/*.log {
2
+        daily
3
+        missingok
4
+        rotate 5
5
+        compress
6
+        notifempty
7
+        create 0644 www-data www-data
8
+}

+ 3
- 0
roles/news/tasks/selfoss.yml Ver fichero

@@ -41,3 +41,6 @@
41 41
 
42 42
 - name: Install selfoss cronjob
43 43
   cron: name="selfoss" user="www-data" minute="*/5" job="curl --silent --show-error -k 'https://{{ selfoss_domain }}/update' > /dev/null"
44
+
45
+- name: Configure selfoss logrotate
46
+  copy: src=etc_logrotate_selfoss dest=/etc/logrotate.d/selfoss owner=root group=root mode=0644

Loading…
Cancelar
Guardar