From 6b0f3de36b1b53f6410ede2418fcb122d69ddb2b Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 22 Feb 2022 19:00:06 +0100 Subject: [PATCH] Update to 2022-02-22 19:00 --- roles/bookstack/tasks/conf.yml | 4 ++++ roles/bookstack/templates/logrotate.conf.j2 | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 roles/bookstack/templates/logrotate.conf.j2 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 }} +}