** 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
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
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