diff --git a/manifests/profile/base/logging/logrotate.pp b/manifests/profile/base/logging/logrotate.pp index f66dda66e..172b560f5 100644 --- a/manifests/profile/base/logging/logrotate.pp +++ b/manifests/profile/base/logging/logrotate.pp @@ -62,10 +62,18 @@ # (optional) Defaults to True. # Configures the logrotate compress parameter. # +# [*minsize*] +# (optional) Defaults to '1'. +# Configures the logrotate minsize parameter. +# # [*maxsize*] # (optional) Defaults to '10M'. # Configures the logrotate maxsize parameter. # +# [*notifempty*] +# (optional) Defaults to True. +# Configures the logrotate notifempty parameter. +# # [*rotation*] # (optional) Defaults to 'daily'. # Configures the logrotate rotation interval. @@ -111,7 +119,9 @@ class tripleo::profile::base::logging::logrotate ( $delaycompress = true, $compress = true, $rotation = 'daily', + $minsize = 1, $maxsize = '10M', + $notifempty = true, $rotate = 14, $purge_after_days = 14, $dateext = undef, diff --git a/templates/logrotate/containers_logrotate.conf.erb b/templates/logrotate/containers_logrotate.conf.erb index a80ce6efa..d5a786700 100644 --- a/templates/logrotate/containers_logrotate.conf.erb +++ b/templates/logrotate/containers_logrotate.conf.erb @@ -4,12 +4,14 @@ maxage <%= @purge_after_days %> # minsize 1 is required for GDPR compliance, all files in # /var/log/containers not managed with logrotate will be purged! - minsize 1 + minsize <%= @minsize %> # Do not use size as it's not compatible with time-based rotation rules # required for GDPR compliance. maxsize <%= @maxsize %> missingok +<%- if @notifempty %> notifempty +<%- end %> <%- if @copytruncate %> copytruncate <%- end %>