From bf9cded6d571fa60e8555ec166c1c68936714544 Mon Sep 17 00:00:00 2001 From: shirenn Date: Sat, 17 Dec 2022 16:32:31 +0100 Subject: [PATCH] randomize reboot time to avoid overloading proxmox and the nfs --- .../templates/apt/apt.conf.d/50unattended-upgrades.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/unattended-upgrades/templates/apt/apt.conf.d/50unattended-upgrades.j2 b/roles/unattended-upgrades/templates/apt/apt.conf.d/50unattended-upgrades.j2 index fe589a0f..558d7791 100644 --- a/roles/unattended-upgrades/templates/apt/apt.conf.d/50unattended-upgrades.j2 +++ b/roles/unattended-upgrades/templates/apt/apt.conf.d/50unattended-upgrades.j2 @@ -96,7 +96,7 @@ Unattended-Upgrade::Automatic-Reboot "{{ unattended.automatic_reboot | default(f // If automatic reboot is enabled and needed, reboot at the specific // time instead of immediately // Default: "now" -Unattended-Upgrade::Automatic-Reboot-Time "04:00"; +Unattended-Upgrade::Automatic-Reboot-Time "{{2 + (3 | random(seed=inventory_hostname+".reboot")) }}:{{ 60 | random(seed=inventory_hostname+".reboot") }}"; // Use apt bandwidth limit feature, this example limits the download // speed to 70kb/sec