2020-11-22 12:28:14 +00:00
|
|
|
% for monitored_node in sorted(monitored_nodes):
|
2021-01-17 17:43:30 +00:00
|
|
|
% if not monitored_node.dummy:
|
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-02-17 09:56:18 +00:00
|
|
|
author = "upgrade-and-reboot"
|
|
|
|
comment = "Downtime for upgrade-and-reboot"
|
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 = {
|
2021-02-18 17:12:25 +00:00
|
|
|
"${days[monitored_node.metadata.get('apt/unattended_upgrades/day', 5)]}" = "01:${monitored_node.magic_number%30}-01:${(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
|