feat(system_baseline): reboot one host at a time and bound a hung apt-daily.service
Add system_baseline_reboot_throttle and system_baseline_reboot_post_delay, passed to the throttle and post_reboot_delay of the reboot task, read by the main flow and by tasks_from: reboot, both defaulting to 0 (today's behaviour) and validated in both. Add system_baseline_apt_daily_timeout: when set, write a TimeoutStartSec drop-in for apt-daily.service and reload systemd. Empty by default, which leaves the host alone. Closes #336 Closes #337 Assisted-by: Claude Code
This commit is contained in:
1 parent
8da65bd08e
commit
7092d68822
14 files changed
+239
-3
No files matched your search
@@ -39,6 +39,23 @@
|
||||
ansible.builtin.import_tasks: validate_apt_upgrade.yml
|
||||
tags: always
|
||||
|
||||
- name: Validate the reboot inputs
|
||||
ansible.builtin.import_tasks: validate_reboot.yml
|
||||
tags: always
|
||||
|
||||
# The value is written into a unit file: one line, starting with a digit, so no line break can add a second directive. systemd itself
|
||||
# refuses a value it cannot parse (it ignores the setting and logs it).
|
||||
- name: Validate the apt-daily start timeout
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- system_baseline_apt_daily_timeout is string
|
||||
- system_baseline_apt_daily_timeout == '' or system_baseline_apt_daily_timeout is match('^(infinity|[0-9][0-9A-Za-z. ]{0,63})\Z')
|
||||
fail_msg: >-
|
||||
system_baseline_apt_daily_timeout must be empty or a systemd time span on one line, for example 1h or 90min
|
||||
(quote a bare number: a plain 60 is not a string).
|
||||
quiet: true
|
||||
tags: always
|
||||
|
||||
# Each package pattern is written inside a double-quoted apt.conf string, like the origins below: the same characters are refused.
|
||||
- name: Validate the unattended-upgrades package blacklist
|
||||
ansible.builtin.assert:
|
||||
|
||||
Reference in new issue
Block a user