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 ...@@ -19,8 +19,8 @@ md5sum = 67954c82a8030e5dcac3a8c5d115f624
[logrotate-entry-template] [logrotate-entry-template]
filename = logrotate_entry.in filename = logrotate_entry.in
md5sum = 7a5ec8f141c61826a14db8619acba314 md5sum = 71462fcd0a97b3ccc7b6ac6af6b2ca1e
[template-logrotate-base] [template-logrotate-base]
filename = instance-logrotate-base.cfg.in filename = instance-logrotate-base.cfg.in
md5sum = 26dbc499413f9140b08fa20541d0db0f md5sum = c786f73c2a99390a5fad8aa3e01de627
...@@ -44,8 +44,14 @@ context = ...@@ -44,8 +44,14 @@ context =
key log :log key log :log
key post :post key post :post
key pre :pre key pre :pre
key frequency :frequency
key rotate_num :rotate-num
key nocompress :nocompress
post = post =
pre = pre =
frequency = daily
rotate-num = 3650
nocompress =
[logrotate] [logrotate]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
......
{{ log }} { {{ log }} {
daily {{ frequency }}
dateext dateext
rotate 3650 rotate {{ rotate_num }}
compress {% if nocompress %}nocompress
delaycompress {% else %}compress
delaycompress{% endif %}
notifempty notifempty
sharedscripts sharedscripts
create 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