Puppet Class: rsyslog::config::logrotate
- Defined in:
- manifests/config/logrotate.pp
Summary
Default log rotation for RSyslogOverview
**NOTE: THIS IS A [PRIVATE](github.com/puppetlabs/puppetlabs-stdlib#assert_private) CLASS**
The list that is managed here matches the list of default files that are managed on the system by this module.
Parameters map to their counterparts in the “logrotate::rule“ defined type.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'manifests/config/logrotate.pp', line 48
class rsyslog::config::logrotate (
Optional[Boolean] $rotate_compress = undef,
Optional[String[1]] $rotate_compresscmd = undef,
Optional[String[1]] $rotate_uncompresscmd = undef,
Optional[String[1]] $rotate_compressext = undef,
Optional[String[1]] $rotate_compressoptions = undef,
Boolean $rotate_copy = false,
Boolean $rotate_copytruncate = false,
Pattern['\d{4} .+ .+'] $rotate_create = '0640 root root',
Enum['daily','weekly','monthly','yearly'] $rotate_period = 'daily',
Optional[Boolean] $rotate_dateext = undef,
String[1] $rotate_dateformat = '-%Y%m%d.%s',
Optional[Boolean] $rotate_dateyesterday = undef,
Optional[Boolean] $rotate_delaycompress = undef,
Optional[String[1]] $rotate_extension = undef,
Boolean $rotate_ifempty = false,
Optional[Array[String[1]]] $rotate_ext_include = undef,
Optional[Simplib::EmailAddress] $rotate_mail = undef,
Boolean $rotate_maillast = true,
Optional[Integer[0]] $rotate_maxage = undef,
Optional[Integer[0]] $rotate_minsize = undef,
Boolean $rotate_missingok = true,
Optional[Stdlib::Absolutepath] $rotate_olddir = undef,
Optional[String[1]] $rotate_postrotate = undef,
Optional[String[1]] $rotate_prerotate = undef,
Optional[String[1]] $rotate_firstaction = undef,
Optional[String[1]] $rotate_lastaction = undef,
Boolean $rotate_lastaction_restart_logger = true,
Optional[String[1]] $rotate_logger_service = simplib::lookup('logrotate::logger_service', {'default_value' => 'rsyslog'}),
Integer[0] $rotate_preserve = 7,
Optional[Integer[0]] $rotate_size = undef,
Boolean $rotate_sharedscripts = true,
Optional[Boolean] $rotate_shred = undef,
Optional[Integer[0]] $rotate_shredcycles = undef,
Boolean $rotate_su = false,
Optional[String[1]] $rotate_su_user = undef,
Optional[String[1]] $rotate_su_group = undef,
Integer[0] $rotate_start = 1,
Optional[Array[String[1]]] $rotate_tabooext = undef,
){
assert_private()
simplib::assert_optional_dependency($module_name, 'simp/logrotate')
include 'logrotate'
logrotate::rule { 'syslog':
log_files => [
'/var/log/boot.log',
'/var/log/cron',
'/var/log/iptables.log',
'/var/log/firewall.log',
'/var/log/maillog',
'/var/log/messages',
'/var/log/puppet*.log',
'/var/log/secure',
'/var/log/slapd*.log',
'/var/log/spooler'
],
compress => $rotate_compress,
compresscmd => $rotate_compresscmd,
uncompresscmd => $rotate_uncompresscmd,
compressext => $rotate_compressext,
compressoptions => $rotate_compressoptions,
copy => $rotate_copy,
copytruncate => $rotate_copytruncate,
create => $rotate_create,
rotate_period => $rotate_period,
dateext => $rotate_dateext,
dateformat => $rotate_dateformat,
dateyesterday => $rotate_dateyesterday,
delaycompress => $rotate_delaycompress,
extension => $rotate_extension,
ifempty => $rotate_ifempty,
ext_include => $rotate_ext_include,
mail => $rotate_mail,
maillast => $rotate_maillast,
maxage => $rotate_maxage,
minsize => $rotate_minsize,
missingok => $rotate_missingok,
olddir => $rotate_olddir,
postrotate => $rotate_postrotate,
prerotate => $rotate_prerotate,
firstaction => $rotate_firstaction,
lastaction => $rotate_lastaction,
lastaction_restart_logger => $rotate_lastaction_restart_logger,
logger_service => $rotate_logger_service,
rotate => $rotate_preserve,
size => $rotate_size,
sharedscripts => $rotate_sharedscripts,
shred => $rotate_shred,
shredcycles => $rotate_shredcycles,
su => $rotate_su,
su_user => $rotate_su_user,
su_group => $rotate_su_group,
start => $rotate_start,
tabooext => $rotate_tabooext,
}
}
|