Add logrotate compress option

Related bz: #1570039

Change-Id: Id07b7b53d31192a2d2172671b272a5b61dc8df52
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
Bogdan Dobrelya 2018-05-04 18:14:48 +02:00
parent 6d51054796
commit f3317084df
3 changed files with 13 additions and 0 deletions

View File

@ -54,6 +54,10 @@
# (optional) Defaults to True.
# Configures the logrotate delaycompress parameter.
#
# [*compress*]
# (optional) Defaults to True.
# Configures the logrotate compress parameter.
#
# [*size*]
# (optional) Defaults to '10M'.
# Configures the logrotate size parameter.
@ -73,6 +77,7 @@ class tripleo::profile::base::logging::logrotate (
Integer $maxdelay = 90,
$user = 'root',
$delaycompress = true,
$compress = true,
$size = '10M',
$rotate = 14,
) {

View File

@ -0,0 +1,5 @@
---
other:
- |
Add the compress option for the containerized logrotate service to
compress rotated logs by default.

View File

@ -5,6 +5,9 @@
notifempty
<%- if @delaycompress %>
delaycompress
<%- end %>
<%- if @compress %>
compress
<%- end %>
postrotate
/sbin/lsof -nPs +L1 +D /var/log 2>&1|\