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 = { defaults = {
'apt': {
'unattended_upgrades': {
'day': 5,
'hour': 21,
},
},
'icinga2_api': { 'icinga2_api': {
'apt': { 'apt': {
'services': { 'services': {
@ -15,8 +21,8 @@ defaults = {
'cron/upgrade-and-reboot' 'cron/upgrade-and-reboot'
) )
def patchday(metadata): def patchday(metadata):
day = metadata.get('apt/unattended_upgrades/day', 5) day = metadata.get('apt/unattended_upgrades/day')
hour = metadata.get('apt/unattended_upgrades/hour', 1) hour = metadata.get('apt/unattended_upgrades/hour')
return { return {
'cron': { 'cron': {

View file

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

View file

@ -9,7 +9,7 @@ object ScheduledDowntime "unattended_upgrades" {
fixed = true fixed = true
ranges = { 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" child_options = "DowntimeTriggeredChildren"

View file

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

View file

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