system-config/modules/logrotate/templates/config.erb
David Shrewsbury 5f4c7fa768 Added new logrotate puppet module.
Allows us to easily manage log rotation. Example:

  logrotate::file { 'xyz':
    log => '/var/log/xyz.log',
    options => ['compress', 'weekly'],
  }

Change-Id: I84fa3a20e0510a1273aa9b8555da0dde4613f50a
2012-05-07 16:24:42 -04:00

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 -%>
}