From 8c54fd8c16aa6b06d20abbb7dda0f421016c1e64 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 5 Jan 2021 17:47:56 +0100 Subject: [PATCH] apache: new variables for logrotate + server-status --- CHANGELOG.md | 2 ++ apache/defaults/main.yml | 4 +++- apache/tasks/main.yml | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d30104f..54e6f8b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ The **patch** part changes incrementally at each release. ### Added +* apache: new variables for logrotate + server-status + ### Changed ### Fixed diff --git a/apache/defaults/main.yml b/apache/defaults/main.yml index 15ff1a53..8b7a15a3 100644 --- a/apache/defaults/main.yml +++ b/apache/defaults/main.yml @@ -11,6 +11,7 @@ apache_evolinux_default_enabled: True apache_evolinux_default_ssl_cert: /etc/ssl/certs/ssl-cert-snakeoil.pem apache_evolinux_default_ssl_key: /etc/ssl/private/ssl-cert-snakeoil.key +apache_serverstatus_host: 127.0.0.1 apache_serverstatus_suffix: "" apache_serverstatus_suffix_file: "/etc/evolinux/apache_serverstatus_suffix" @@ -20,4 +21,5 @@ apache_munin_include: True general_alert_email: "root@localhost" log2mail_alert_email: Null -apache_serverstatus_host: 127.0.0.1 +apache_logrotate_frequency: weekly +apache_logrotate_rotate: 52 diff --git a/apache/tasks/main.yml b/apache/tasks/main.yml index b7611cac..3854c539 100644 --- a/apache/tasks/main.yml +++ b/apache/tasks/main.yml @@ -161,19 +161,19 @@ tags: - apache -- name: "logrotate: rotate weekly" +- name: "logrotate: {{ apache_logrotate_frequency }}" replace: dest: /etc/logrotate.d/apache2 regexp: "(daily|weekly|monthly)" - replace: "weekly" + replace: "{{ apache_logrotate_frequency }}" tags: - apache -- name: "logrotate: keep 52 files" +- name: "logrotate: rotate {{ apache_logrotate_rotate }}" replace: dest: /etc/logrotate.d/apache2 regexp: '^(\s+rotate) \d+$' - replace: '\1 52' + replace: '\1 {{ apache_logrotate_rotate }}' tags: - apache