diff --git a/roles/bookstack/tasks/conf.yml b/roles/bookstack/tasks/conf.yml index 74fd9eb..cc0f6ab 100644 --- a/roles/bookstack/tasks/conf.yml +++ b/roles/bookstack/tasks/conf.yml @@ -52,3 +52,7 @@ command: "{{ bookstack_root_dir }}/perms.sh" when: bookstack_perm_script.changed or bookstack_install_mode != 'none' tags: bookstack + +- name: Deploy logrotate conf + template: src=logrotate.conf.j2 dest=/etc/logrotate.d/bookstack_{{ bookstack_id }} + tags: bookstack diff --git a/roles/bookstack/templates/logrotate.conf.j2 b/roles/bookstack/templates/logrotate.conf.j2 new file mode 100644 index 0000000..b190e4d --- /dev/null +++ b/roles/bookstack/templates/logrotate.conf.j2 @@ -0,0 +1,7 @@ +{{ bookstack_root_dir }}/data/storage/logs/*.log { + daily + rotate 90 + compress + missingok + su {{ bookstack_php_user }} {{ bookstack_php_user }} +}