Enabling log compression by default

Most of the logs are compressed already based on configurations in
/etc/logrotate.d, but this patch ensures that the remaining logs are
compressed during the rotation process.

Closes-Bug: 1493981

Change-Id: If11c6d3a292b3621c00a8d0b775274a8096eaa66
(cherry picked from commit 424377ff17)
This commit is contained in:
Major Hayden 2015-09-09 14:31:22 -05:00 committed by Jesse Pretorius
parent d1fb5dc4b1
commit 375f4165d5
2 changed files with 18 additions and 0 deletions

View File

@ -54,6 +54,15 @@
tags:
- rsyslog-client-config
- name: Configure logrotate to compress logs by default
lineinfile:
dest: /etc/logrotate.conf
regexp: "^#compress"
line: "compress"
backrefs: yes
tags:
- rsyslog-client-config
- name: Start rsyslog
service:
name: "rsyslog"

View File

@ -44,6 +44,15 @@
tags:
- rsyslog-config
- name: Configure logrotate to compress logs by default
lineinfile:
dest: /etc/logrotate.conf
regexp: "^#compress"
line: "compress"
backrefs: yes
tags:
- rsyslog-config
- name: Start rsyslog
service:
name: "rsyslog"