bundlewrap/bundles/apt/metadata.py

26 lines
630 B
Python
Raw Normal View History

defaults = {
'icinga2_api': {
'apt': {
'services': {
'UNATTENDED UPGRADES': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_unattended_upgrades',
},
},
},
},
}
@metadata_reactor
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,
),
},
}