Commit c3219f00 authored by Rafael Monnerat's avatar Rafael Monnerat

stack/logrotate: Allow we define frequency, nocompress and rotate

  This change allow us simplify accross the instances usage of logrotate
parent 9eb56f55
......@@ -19,8 +19,8 @@ md5sum = 67954c82a8030e5dcac3a8c5d115f624
[logrotate-entry-template]
filename = logrotate_entry.in
md5sum = 7a5ec8f141c61826a14db8619acba314
md5sum = 71462fcd0a97b3ccc7b6ac6af6b2ca1e
[template-logrotate-base]
filename = instance-logrotate-base.cfg.in
md5sum = 26dbc499413f9140b08fa20541d0db0f
md5sum = c786f73c2a99390a5fad8aa3e01de627
......@@ -44,8 +44,14 @@ context =
key log :log
key post :post
key pre :pre
key frequency :frequency
key rotate_num :rotate-num
key nocompress :nocompress
post =
pre =
frequency = daily
rotate-num = 3650
  • I would tend to prefer sticking to logrotate wording (rotate without suffix) as anyone using these sections anyway needs to know this is logrotate configuration (ie, they must know what values are valid for frequency, which is fine for me), especially as proposed suffix is an abbreviation - which is generally frowned upon in Nexedi.

Please register or sign in to reply
nocompress =
Please register or sign in to reply
[logrotate]
recipe = slapos.cookbook:wrapper
......
{{ log }} {
daily
{{ frequency }}
dateext
rotate 3650
compress
delaycompress
rotate {{ rotate_num }}
{% if nocompress %}nocompress
{% else %}compress
delaycompress{% endif %}
notifempty
sharedscripts
create
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment