Allows us to easily manage log rotation. Example:
logrotate::file { 'xyz':
log => '/var/log/xyz.log',
options => ['compress', 'weekly'],
}
Change-Id: I84fa3a20e0510a1273aa9b8555da0dde4613f50a
25 lines
410 B
Plaintext
25 lines
410 B
Plaintext
<%= log %> {
|
|
<% options.each do |opt| -%> <%= opt %>
|
|
<% end -%>
|
|
<% if prerotate != 'undef' -%>
|
|
prerotate
|
|
<%= prerotate %>
|
|
endscript
|
|
<% end -%>
|
|
<% if postrotate != 'undef' -%>
|
|
postrotate
|
|
<%= postrotate %>
|
|
endscript
|
|
<% end -%>
|
|
<% if firstaction != 'undef' -%>
|
|
firstaction
|
|
<%= firstaction %>
|
|
endscript
|
|
<% end -%>
|
|
<% if lastaction != 'undef' -%>
|
|
lastaction
|
|
<%= lastaction %>
|
|
endscript
|
|
<% end -%>
|
|
}
|