puppet-tripleo/templates/logrotate/containers_logrotate.conf.erb
Keigo Noha 1eafeb67bf Add dateext and related parameters for logrotate
logrotate.pp should support dateext and related parameters.
By this change, a filename of a rotated file can be easily distinguished
by rotated date.

Change-Id: I798304a472df41b86a88611c97c2c99131faa0ad
2019-07-08 16:58:38 +09:00

32 lines
763 B
Plaintext

/var/log/containers/*/*log /var/log/containers/*/*/*log /var/log/containers/*/*err {
<%= @rotation %>
rotate <%= @rotate %>
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
# Do not use size as it's not compatible with time-based rotation rules
# required for GDPR compliance.
maxsize <%= @maxsize %>
missingok
notifempty
<%- if @copytruncate %>
copytruncate
<%- end %>
<%- if @delaycompress %>
delaycompress
<%- end %>
<%- if @compress %>
compress
<%- end %>
<%- if @dateext %>
dateext
<%- if @dateformat %>
dateformat <%= @dateformat %>
<%- end %>
<%- if @dateyesterday %>
dateyesterday
<%- end %>
<%- end %>
}