Defined Type: logrotate::add
- Defined in:
- manifests/rule.pp
Overview
Add a LogRotate Configuration
If options have a 'no' variant, then the no variant will be set if you set the primary value to false
The logrotate(5)
man page should be referenced for any
undocumented parameter.
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 |
# File 'manifests/rule.pp', line 54
define logrotate::add (
Array[String] $log_files,
Boolean $compress = true,
Optional[String] $compresscmd = undef,
Optional[String] $uncompresscmd = undef,
Optional[String] $compressext = undef,
Optional[String] $compressoptions = undef,
Boolean $copy = false,
Boolean $copytruncate = false,
Pattern['\d{4} .+ .+'] $create = '0640 root root',
Optional[Enum['daily','weekly','monthly','yearly']] $rotate_period = undef,
Boolean $dateext = true,
String $dateformat = '-%Y%m%d.%s',
Optional[Boolean] $delaycompress = undef,
Optional[String] $extension = undef,
Boolean $ifempty = false,
Array[String] $ext_include = [],
Simplib::EmailAddress $mail = undef,
Boolean $maillast = true,
Integer[0] $maxage = undef,
Integer[0] $minsize = undef,
Boolean $missingok = false,
Optional[Stdlib::Absolutepath] $olddir = undef,
Optional[String] $postrotate = undef,
Optional[String] $prerotate = undef,
Optional[String] $firstaction = undef,
Optional[String] $lastaction = undef,
Integer[0] $rotate = 4,
Optional[Integer[0]] $size = undef,
Boolean $sharedscripts = true,
Integer[0] $start = 1,
Array[String] $tabooext = []
) {
file { "/etc/logrotate.d/${name}":
owner => 'root',
group => 'root',
mode => '0644',
content => template('logrotate/conf.erb')
}
}
|