Files
Kamino/roles/system_baseline/tasks/apt_daily_timeout.yml
T
Dragonish 7092d68822
Build / build (pull_request) Successful in 16s
Lint / lint (pull_request) Successful in 1m0s
Molecule / molecule (pull_request) Successful in 2m2s
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
2026-11-23 21:01:40 +00:00

25 lines
864 B
YAML

---
# A hung apt-daily.service (a stuck mirror, a dpkg lock that never frees) blocks the next apt run on the host for as long as systemd lets
# it start. A drop-in bounds the start. Only apt-daily.service: apt-daily-upgrade.service is left to its own timeout.
- name: Ensure the apt-daily drop-in directory exists
become: true
ansible.builtin.file:
path: /etc/systemd/system/apt-daily.service.d
state: directory
owner: root
group: root
mode: "0755"
- name: Bound the start of apt-daily.service
become: true
ansible.builtin.copy:
dest: /etc/systemd/system/apt-daily.service.d/10-timeout.conf
content: |
# Managed by Ansible (role system_baseline).
[Service]
TimeoutStartSec={{ system_baseline_apt_daily_timeout }}
owner: root
group: root
mode: "0644"
notify: Reload systemd for apt-daily timeout