2020-11-22 12:28:14 +00:00
|
|
|
% for monitored_node in sorted(monitored_nodes):
|
2021-06-28 17:48:05 +00:00
|
|
|
% if monitored_node.has_any_bundle(['apt', 'c3voc-addons']):
|
2020-11-22 12:28:14 +00:00
|
|
|
object ScheduledDowntime "unattended_upgrades" {
|
2021-02-17 09:56:18 +00:00
|
|
|
host_name = "${monitored_node.name}"
|
2020-11-22 12:28:14 +00:00
|
|
|
|
2021-04-23 12:30:34 +00:00
|
|
|
author = "unattended-upgrades"
|
|
|
|
comment = "Downtime for upgrade-and-reboot of node ${monitored_node.name}"
|
2020-11-22 12:28:14 +00:00
|
|
|
|
2021-02-17 09:56:18 +00:00
|
|
|
fixed = true
|
2020-11-22 12:28:14 +00:00
|
|
|
|
2021-02-17 09:56:18 +00:00
|
|
|
ranges = {
|
2022-01-23 04:47:42 +00:00
|
|
|
"${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}"
|
2021-02-17 09:56:18 +00:00
|
|
|
}
|
2020-11-22 12:28:14 +00:00
|
|
|
|
2021-02-17 09:56:18 +00:00
|
|
|
child_options = "DowntimeTriggeredChildren"
|
2020-11-22 12:28:14 +00:00
|
|
|
}
|
|
|
|
% endif
|
|
|
|
% endfor
|