crowbar/crowbar-core

View on GitHub
chef/cookbooks/crowbar-hacks/templates/default/logrotate.erb

Summary

Maintainability
Test Coverage
# Managed by Crowbar
# Do not edit

<%= if @logfiles.respond_to?(:join)
       @logfiles.join(" ")
    else
       @logfiles
end %>
{
    <%= @freq || "daily" %>
    rotate <%= @copies || 7 %>
    size <%= @size || "10M" %>
    compress
    delaycompress
    missingok
    notifempty
    sharedscripts
    <%= @action || "create 644 root root" %>
    <% %w(firstaction prerotate postrotate lastaction).each do |a|
         next unless self.instance_variable_defined?("@#{a}") -%>
    <%= a %>
    <%= self.instance_variable_get("@#{a}") %> || true
    endscript
    <% end -%>
}