bundles/apt: move patchday to 21:00 UTC

This commit is contained in:
Franzi 2021-05-13 09:10:33 +02:00
parent 835726f3a7
commit 7775f33679
Signed by: kunsi
GPG key ID: 12E3D2136B818350
5 changed files with 26 additions and 11 deletions

View file

@ -1,4 +1,10 @@
defaults = {
'apt': {
'unattended_upgrades': {
'day': 5,
'hour': 21,
},
},
'icinga2_api': {
'apt': {
'services': {
@ -15,8 +21,8 @@ defaults = {
'cron/upgrade-and-reboot'
)
def patchday(metadata):
day = metadata.get('apt/unattended_upgrades/day', 5)
hour = metadata.get('apt/unattended_upgrades/hour', 1)
day = metadata.get('apt/unattended_upgrades/day')
hour = metadata.get('apt/unattended_upgrades/hour')
return {
'cron': {

View file

@ -1,4 +1,10 @@
defaults = {
'apt': {
'unattended_upgrades': {
'day': 5,
'hour': 21,
},
},
'icinga2_api': {
'apt': {
'services': {
@ -22,8 +28,8 @@ defaults = {
'cron/upgrade-and-reboot'
)
def patchday(metadata):
day = metadata.get('apt/unattended_upgrades/day', 5)
hour = metadata.get('apt/unattended_upgrades/hour', 1)
day = metadata.get('apt/unattended_upgrades/day')
hour = metadata.get('apt/unattended_upgrades/hour')
return {
'cron': {

View file

@ -9,7 +9,7 @@ object ScheduledDowntime "unattended_upgrades" {
fixed = true
ranges = {
"${days[monitored_node.metadata.get('apt/unattended_upgrades/day', 5)]}" = "01:${monitored_node.magic_number%30}-01:${(monitored_node.magic_number%30)+30}"
"${days[monitored_node.metadata.get('apt/unattended_upgrades/day')]}" = "${monitored_node.metadata.get('apt/unattended_upgrades/hour')}:${monitored_node.magic_number%30}-${monitored_node.metadata.get('apt/unattended_upgrades/hour')}:${(monitored_node.magic_number%30)+30}"
}
child_options = "DowntimeTriggeredChildren"

View file

@ -9,6 +9,15 @@ nodes['home.kodi-wohnzimmer'] = {
'debian-buster',
},
'metadata': {
'apt': {
'packages': {
'intel-media-va-driver-non-free': {},
},
'unattended_upgrades': {
'day': 6,
'hour': 2,
},
},
'interfaces': {
'eno1': {
'ips': {
@ -17,11 +26,6 @@ nodes['home.kodi-wohnzimmer'] = {
'gateway4': '172.19.138.1',
},
},
'apt': {
'packages': {
'intel-media-va-driver-non-free': {},
},
},
'backup-client': {
'server': '172.19.138.20:22',
},

View file

@ -18,7 +18,6 @@ nodes['voc.pretalx'] = {
# clashing with actual events is less likely.
'unattended_upgrades': {
'day': 1,
'hour': 21,
},
},
'interfaces': {