unattended_upgrades: needrestart lists services instead of restarting them, replaces the package blacklist

This commit is contained in:
2026-11-14 08:00:30 +00:00
parent 704a5d9389
commit f32e6930f5
4 changed files with 17 additions and 15 deletions
+15
View File
@@ -23,6 +23,21 @@
dest: /etc/apt/apt.conf.d/52unattended-upgrades-local
mode: "0644"
# needrestart (Ubuntu default) restarts every service that uses an upgraded library, containerd and netbird included:
# after a libc upgrade the dead FUSE mounts hung systemd-resolved on antius and the node went NotReady (2026-11-14).
# List only; the services pick up the library at the next reboot, which HostRebootRequired tracks.
- name: Check for needrestart
ansible.builtin.stat:
path: /etc/needrestart/conf.d
register: unattended_upgrades_needrestart
- name: Let needrestart list the services instead of restarting them
ansible.builtin.template:
src: needrestart-list-only.conf.j2
dest: /etc/needrestart/conf.d/90-list-only.conf
mode: "0644"
when: unattended_upgrades_needrestart.stat.exists
# Debian installs apt-listchanges with email_address=root, which mails the NEWS of every
# unattended upgrade through the mail relay.
- name: Check for the apt-listchanges config