2026-10-01 13:52:10 +02:00
|
|
|
#### confdroid_ntp::main::files.pp
|
|
|
|
|
# Module name: confdroid_ntp
|
|
|
|
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
|
|
|
|
# @summary Class manages files for the confdroid_ntp module
|
|
|
|
|
###############################################################################
|
|
|
|
|
class confdroid_ntp::main::files (
|
|
|
|
|
|
|
|
|
|
) inherits confdroid_ntp::params {
|
|
|
|
|
require confdroid_ntp::main::dirs
|
2026-10-01 14:14:07 +02:00
|
|
|
|
|
|
|
|
# main configuration file
|
2026-10-02 12:57:28 +02:00
|
|
|
file { $cy_conf_file:
|
|
|
|
|
ensure => file,
|
|
|
|
|
owner => 'root',
|
|
|
|
|
group => 'root',
|
|
|
|
|
mode => '0644',
|
|
|
|
|
selrange => s0,
|
|
|
|
|
selrole => object_r,
|
|
|
|
|
seltype => etc_t,
|
|
|
|
|
seluser => system_u,
|
|
|
|
|
content => template($cy_conf_erb),
|
2026-10-02 13:37:56 +02:00
|
|
|
notify => Service[$cy_service],
|
2026-10-02 12:57:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# drift file /var/lib/chrony/drift
|
2026-10-04 12:09:10 +02:00
|
|
|
file { $cy_drift_file:
|
|
|
|
|
ensure => file,
|
|
|
|
|
owner => 'chrony',
|
|
|
|
|
group => 'chrony',
|
|
|
|
|
mode => '0644',
|
|
|
|
|
selrange => s0,
|
|
|
|
|
selrole => object_r,
|
|
|
|
|
seltype => chronyd_var_lib_t,
|
|
|
|
|
seluser => system_u,
|
|
|
|
|
}
|
2026-10-01 14:14:07 +02:00
|
|
|
|
|
|
|
|
# log rotation
|
2026-10-04 12:19:36 +02:00
|
|
|
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),
|
|
|
|
|
}
|
2026-10-01 13:52:10 +02:00
|
|
|
}
|