From: Matt Birkholz Date: Sat, 15 Mar 2025 21:15:49 +0000 (-0500) Subject: Keep just 2 weeks of Apache logs on Droplet. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=fca17a8ab7daea6824c39f025ecd0a6a0b1166fa;p=Network Keep just 2 weeks of Apache logs on Droplet. --- 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