Puppet Class: logrotate
- Defined in:
- modules/logrotate/manifests/init.pp
Summary
manage the log rotate serviceOverview
SPDX-License-Identifier: Apache-2.0
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'modules/logrotate/manifests/init.pp', line 4
class logrotate (
Boolean $hourly = false,
) {
ensure_packages(['logrotate'])
$hourly_content = @(CONTENT)
[Unit]
Description=Rotation of log files
[Timer]
OnCalendar=
OnCalendar=hourly
|CONTENT
systemd::unit { 'logrotate.timer:hourly-override':
ensure => $hourly.bool2str('present', 'absent'),
unit => 'logrotate.timer',
override => true,
content => $hourly_content,
}
}
|