From 5c5361dbb5541e766109e0038a99e0b65b036007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Sun, 22 Apr 2018 17:44:37 +0200 Subject: [PATCH] apache: customize logrotate (52 weeks) --- CHANGELOG.md | 1 + apache/tasks/main.yml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 182bd1c9..2c740454 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The **patch** part changes incrementally at each release. ### Added ### Changed +* apache: customize logrotate (52 weeks) * evolinux: groups for SSH configuration are used with Debian 10 and later * evolinux-base: fail2ban is not enabled by default * evolinux-users: refactoring of the SSH configuration diff --git a/apache/tasks/main.yml b/apache/tasks/main.yml index 338556f4..6801ba22 100644 --- a/apache/tasks/main.yml +++ b/apache/tasks/main.yml @@ -163,6 +163,22 @@ tags: - apache +- name: "logrotate: rotate weekly" + replace: + dest: /etc/logrotate.d/apache2 + regexp: "(daily|weekly|monthly)" + replace: "weekly" + tags: + - apache + +- name: "logrotate: keep 52 files" + replace: + dest: /etc/logrotate.d/apache2 + regexp: "rotate .+" + replace: "rotate 52" + tags: + - apache + - include: log2mail.yml when: apache_log2mail_include tags: