Skip to content

Commit

Permalink
Add configuration for logrotate
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Pogozhiy committed May 31, 2017
1 parent 4c744d1 commit 8951344
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion metadata.rb
Expand Up @@ -4,7 +4,7 @@
maintainer_email 'jj@chef.io'
license 'Apache-2.0'
description 'Installs and configures RabbitMQ server'
version '5.1.0'
version '5.1.1'
recipe 'rabbitmq', 'Install and configure RabbitMQ'
recipe 'rabbitmq::cluster', 'Set up RabbitMQ clustering.'
recipe 'rabbitmq::plugin_management', 'Manage plugins with node attributes'
Expand Down
14 changes: 7 additions & 7 deletions recipes/default.rb
Expand Up @@ -92,13 +92,13 @@ class Chef::Resource
include_recipe 'logrotate'

logrotate_app 'rabbitmq-server' do
path '/var/log/rabbitmq/*.log'
enable true
rotate 20
frequency 'weekly'
options %w(missingok notifempty delaycompress)
sharedscripts true
postrotate '/usr/sbin/rabbitmqctl rotate_logs > /dev/null'
path node['rabbitmq']['logrotate']['path']
enable node['rabbitmq']['logrotate']['enable']
rotate node['rabbitmq']['logrotate']['rotate']
frequency node['rabbitmq']['logrotate']['frequency']
options node['rabbitmq']['logrotate']['options']
sharedscripts node['rabbitmq']['logrotate']['sharedscripts']
postrotate node['rabbitmq']['logrotate']['postrotate']
end

template "/etc/init/#{node['rabbitmq']['service_name']}.conf" do
Expand Down

0 comments on commit 8951344

Please sign in to comment.