- create service to run dnf update - create timer to call the service - manage settings via params
19 lines
533 B
Puppet
19 lines
533 B
Puppet
# profiles::yum::autoupdater
|
|
#
|
|
# manage automatic updates for dnf
|
|
#
|
|
class profiles::yum::autoupdater (
|
|
String $on_calendar = '*-*-* 05:00:00',
|
|
Integer $randomized_delay_sec = 1800,
|
|
Boolean $enabled = true,
|
|
) {
|
|
|
|
# Ensure the timer is enabled and running
|
|
systemd::timer { 'dnf-autoupdate.timer':
|
|
timer_content => template('profiles/yum/autoupdate_timer.erb'),
|
|
service_content => template('profiles/yum/autoupdate_service.erb'),
|
|
active => true,
|
|
enable => true,
|
|
}
|
|
}
|