https://github.com/linyows/logrotate-cookbook
Installs/Configures logrotate
https://github.com/linyows/logrotate-cookbook
Last synced: 28 days ago
JSON representation
Installs/Configures logrotate
- Host: GitHub
- URL: https://github.com/linyows/logrotate-cookbook
- Owner: linyows
- Created: 2013-09-13T09:06:05.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-13T09:59:05.000Z (over 11 years ago)
- Last Synced: 2025-04-03T13:00:33.011Z (about 1 month ago)
- Language: Ruby
- Size: 109 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Logrotate Cookbook
==================This cookbook makes logrotate.
Attributes
----------#### logrotate::default
Key | Description | Default
--- | ----------- | -------
rotations | rotations | {}
default | generics settings | {}Usage
-----Role based logrotate example:
```ruby
run_list(
'recipe[logrotate]'
)override_attributes(
:logrotate => {
:frequency => 'daily',
:rotation_limit => 60,
:creating_log =>'0660 root utmp',
:delay_compress => true,
:date_ext => true,
:rotations => {
:app_production => {
:log_paths => '/var/www/deploys/rails_app/shared/log/*.log',
:last_action => <<-CMD.gsub(/\s+/, ' ')
pid=/var/www/deploys/rails_app/shared/pids/unicorn.pid;
test -s $pid && kill -USR1 "$(cat $pid)"
CMD
},
:app_staging => {
:log_paths => '/var/www/deploys/rails_app_staging/shared/log/*.log',
:last_action => <<-CMD.gsub(/\s+/, ' ')
pid=/var/www/deploys/rails_app/shared/pids/unicorn.pid;
test -s $pid && kill -USR1 "$(cat $pid)"
CMD
}
}
}
)
```License and Authors
-------------------MIT license