From fd03ac3330056d2a0057ad83b85ff733bcb17546 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 25 May 2020 15:00:05 +0200 Subject: [PATCH] Update to 2020-05-25 15:00 --- roles/dolibarr/tasks/install.yml | 7 +++++++ roles/dolibarr/templates/logrotate.conf.j2 | 6 +----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/roles/dolibarr/tasks/install.yml b/roles/dolibarr/tasks/install.yml index 23c295d..3aefdbe 100644 --- a/roles/dolibarr/tasks/install.yml +++ b/roles/dolibarr/tasks/install.yml @@ -122,6 +122,13 @@ state: "{{ (dolibarr_sync_from_ldap is defined and dolibarr_sync_from_ldap) | ternary('present','absent') }}" tags: dolibarr +- name: Set var_log_t context for log files + sefcontext: + target: '{{ dolibarr_root_dir }}/data/.*\.log' + setype: httpd_log_t + when: ansible_selinux.status == 'enabled' + tags: dolibarr + - name: Install logrotate configuration template: src=logrotate.conf.j2 dest=/etc/logrotate.d/dolibarr_{{ dolibarr_id }} tags: dolibarr diff --git a/roles/dolibarr/templates/logrotate.conf.j2 b/roles/dolibarr/templates/logrotate.conf.j2 index 617823f..2da3ddb 100644 --- a/roles/dolibarr/templates/logrotate.conf.j2 +++ b/roles/dolibarr/templates/logrotate.conf.j2 @@ -1,11 +1,7 @@ -{{ dolibarr_root_dir }}/data/dolibarr.log { +{{ dolibarr_root_dir }}/data/*.log { weekly rotate 52 compress - compressoptions -T0 - compresscmd /usr/bin/xz - compressext .xz - uncompresscmd /usr/bin/unxz missingok create 640 {{ dolibarr_php_user }} {{ dolibarr_php_user }} }