-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Builds on the work by @rmol in #5853. Slots in overrides to the apt-daily{,-upgrade} timers, shipped with the 'apt' package, to provide fine-grained control over the update and reboot times. Ensures that the apt lists are updated approximately 1h prior to the package upgrade. Lowered the time-fuzzing to 20m on each action, so that even at the extremes, there's still a 20m window for an apt update to complete. Uses a modulus to determine the sooner update time. (cherry picked from commit 34fdc7a)
- Loading branch information
Showing
8 changed files
with
40 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,7 @@ | |
- name: update apt cache | ||
apt: | ||
update_cache: yes | ||
|
||
- name: systemd daemon-reload | ||
systemd: | ||
daemon_reload: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
install_files/ansible-base/roles/common/templates/apt-daily-timer-override.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[Timer] | ||
OnCalendar= | ||
OnCalendar=*-*-* {{ (daily_reboot_time|int - 1) % 24 }}:00 | ||
RandomizedDelaySec=20m | ||
Persistent=true |
4 changes: 4 additions & 0 deletions
4
install_files/ansible-base/roles/common/templates/apt-daily-upgrade-timer-override.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[Timer] | ||
OnCalendar= | ||
OnCalendar=*-*-* {{ daily_reboot_time }}:00 | ||
RandomizedDelaySec=20m |
4 changes: 0 additions & 4 deletions
4
..._files/securedrop-config-focal/etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
install_files/securedrop-config-focal/etc/systemd/system/apt-daily.timer.d/override.conf
This file was deleted.
Oops, something went wrong.