From fca17a8ab7daea6824c39f025ecd0a6a0b1166fa Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sat, 15 Mar 2025 16:15:49 -0500 Subject: [PATCH] Keep just 2 weeks of Apache logs on Droplet. --- README.org | 4 ++-- roles_t/abbey-front/tasks/main.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index fdb1dc4..b56ee0d 100644 --- a/README.org +++ b/README.org @@ -474,7 +474,7 @@ rest of the Let's Encrypt configuration is discussed in the following ** Configure Apache Log Archival These tasks hack Apache's ~logrotate(8)~ configuration to rotate -weekly, keep the last 12 weeks, and email each week's log to ~root~. +weekly, keep a couple weeks, and email each week's log to ~root~. The ~logrotate(8)~ manual page explains the configuration options. The Systemd configuration drop tells ~logrotate~ to use a special @@ -494,7 +494,7 @@ The replacement =logrotate-mailer= does, and includes it in a line: "{{ item.line }}" loop: - { regexp: '^ *daily', line: "\tweekly" } - - { regexp: '^ *rotate', line: "\trotate 12" } + - { regexp: '^ *rotate', line: "\trotate 2" } - name: Configure Apache log email. become: yes diff --git a/roles_t/abbey-front/tasks/main.yml b/roles_t/abbey-front/tasks/main.yml index 1b25a1e..f5d560b 100644 --- a/roles_t/abbey-front/tasks/main.yml +++ b/roles_t/abbey-front/tasks/main.yml @@ -125,7 +125,7 @@ line: "{{ item.line }}" loop: - { regexp: '^ *daily', line: "\tweekly" } - - { regexp: '^ *rotate', line: "\trotate 12" } + - { regexp: '^ *rotate', line: "\trotate 2" } - name: Configure Apache log email. become: yes -- 2.25.1