OP#830 add logrotation file
This commit is contained in:
@@ -35,4 +35,15 @@ class confdroid_ntp::main::files (
|
||||
}
|
||||
|
||||
# log rotation
|
||||
file { $cy_logrotate_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
content => template($cy_logrotate_erb),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ class confdroid_ntp::params (
|
||||
$cy_conf_file = '/etc/chrony.conf'
|
||||
$cy_conf_erb = 'confdroid_ntp/chrony.conf.erb'
|
||||
$cy_drift_file = '/var/lib/chrony/drift'
|
||||
$cy_logrotate_file = '/etc/logrotate.d/chrony'
|
||||
$cy_logrotate_erb = 'confdroid_ntp/logrotate.chrony.erb'
|
||||
|
||||
# service
|
||||
$cy_service = 'chronyd'
|
||||
|
||||
9
templates/logrotate.chrony.erb
Normal file
9
templates/logrotate.chrony.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
# file created by Puppet, manual changes will be overwritten
|
||||
/var/log/chrony/*.log {
|
||||
missingok
|
||||
nocreate
|
||||
sharedscripts
|
||||
postrotate
|
||||
/usr/bin/chronyc cyclelogs > /dev/null 2>&1 || true
|
||||
endscript
|
||||
}
|
||||
Reference in New Issue
Block a user