Update logrotate cookbook

This commit is contained in:
Greg Karékinian
2017-05-02 11:58:32 +02:00
parent 180b3f5df0
commit ccbf11a407
23 changed files with 679 additions and 506 deletions

View File

@@ -2,7 +2,9 @@
# Cookbook Name:: logrotate
# Attribute:: default
#
# Copyright 2013, Chef
# Copyright 2013, Chef Software, Inc
# Copyright 2015-2016, Steven Danna
# Copyright 2016, Bloomberg Finance L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,22 +19,36 @@
# limitations under the License.
#
default['logrotate']['global'] = {
'weekly' => true,
'rotate' => 4,
'create' => '',
default["logrotate"]["package"] = {
"name" => "logrotate",
"source" => nil,
"version" => nil,
"provider" => nil,
}
'/var/log/wtmp' => {
'missingok' => true,
'monthly' => true,
'create' => '0664 root utmp',
'rotate' => 1
default["logrotate"]["directory"] = "/etc/logrotate.d"
default["logrotate"]["cron"]["install"] = platform?("solaris2") || platform?("aix")
default["logrotate"]["cron"]["name"] = "logrotate"
default["logrotate"]["cron"]["command"] = "/usr/sbin/logrotate /etc/logrotate.conf"
default["logrotate"]["cron"]["minute"] = 35
default["logrotate"]["cron"]["hour"] = 2
default["logrotate"]["global"] = {
"weekly" => true,
"rotate" => 4,
"create" => "",
"/var/log/wtmp" => {
"missingok" => true,
"monthly" => true,
"create" => "0664 root utmp",
"rotate" => 1,
},
'/var/log/btmp' => {
'missingok' => true,
'monthly' => true,
'create' => '0660 root utmp',
'rotate' => 1
}
"/var/log/btmp" => {
"missingok" => true,
"monthly" => true,
"create" => "0660 root utmp",
"rotate" => 1,
},
}