bundlewrap/bundles/apt/metadata.py
Franziska Kunsmann 2d42e5f7dd
All checks were successful
bundlewrap/pipeline/head This commit looks good
update bw to 4.3, add .provides() to metadata reactors
2021-01-07 18:44:38 +01:00

27 lines
672 B
Python

defaults = {
'icinga2_api': {
'apt': {
'services': {
'UNATTENDED UPGRADES': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_unattended_upgrades',
},
},
},
},
}
@metadata_reactor.provides(
'cron/upgrade-and-reboot'
)
def patchday(metadata):
day = metadata.get('apt/unattended_upgrades/day', 5)
return {
'cron': {
'upgrade-and-reboot': '{minute} 1 * * {day} root /usr/local/sbin/upgrade-and-reboot'.format(
minute=node.magic_number % 30,
day=day,
),
},
}