From 6f397c63a9f8629a6b7952b80fca4b77a59d0fa1 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 14 Oct 2023 15:32:50 -0400 Subject: [PATCH] sysd-netd-debian.yml: Install systemd-resolved (if available) --- roles/network/tasks/main.yml | 4 ++-- roles/network/tasks/sysd-netd-debian.yml | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/roles/network/tasks/main.yml b/roles/network/tasks/main.yml index 9e2954892..7a1e6d5f5 100644 --- a/roles/network/tasks/main.yml +++ b/roles/network/tasks/main.yml @@ -75,13 +75,13 @@ - name: NetworkManager in use include_tasks: NM-debian.yml when: network_manager_active - #when: is_debuntu and network_manager_active - name: systemd-networkd in use include_tasks: sysd-netd-debian.yml when: systemd_networkd_active - #when: is_debuntu and systemd_networkd_active + #when: systemd_networkd_active and not network_manager_active # 2023-10-11: NOT the right way to solve #3657 (systemd-resolved issue on RasPiOS 12+) as this would damage Ubuntu/Mint. + # 2023-10-11: Should rpi_debian.yml go away in future, now that RasPiOS Bookworm uses NetworkManager? - name: Raspbian can use dhcpcd only with no N-M or SYS-NETD active include_tasks: rpi_debian.yml when: is_raspbian and not network_manager_active diff --git a/roles/network/tasks/sysd-netd-debian.yml b/roles/network/tasks/sysd-netd-debian.yml index 3fe944511..7fb0e26c9 100644 --- a/roles/network/tasks/sysd-netd-debian.yml +++ b/roles/network/tasks/sysd-netd-debian.yml @@ -1,14 +1,19 @@ # sysd-netd-debian.yml -- name: 'Install networkd-dispatcher +- name: Install networkd-dispatcher package: - name: - - networkd-dispatcher # 15kB download: Dispatcher service for systemd-networkd connection status changes + name: networkd-dispatcher # 15kB download: Dispatcher service for systemd-networkd connection status changes -- name: 'Install systemd-resolved for RasPiOS +# 2023-10-14 #3657, #3658, #3659: New RasPiOS 12/Bookworm issue. +# FWIW Ubuntu >= 22.10 offers 'systemd-resolved' as a distinct apt package. +# Whereas Ubuntu <= 22.04 bundled the functionality within apt package 'systemd' +# Debian 12/Bookworm (like Ubuntu >= 22.10) offers it as a distinct package: +# https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#systemd-resolved +- name: Install systemd-resolved (or intentionally show red error then continue, if apt package not available) package: - name: - - systemd-resolved - when: is_raspbian and os_ver is version('raspbian-12', '>=') + name: systemd-resolved # 278kB download: For RasPiOS 12/Bookworm + ignore_errors: yes + #shell: apt -y install systemd-resolved || true + #when: is_raspbian and os_ver is version('raspbian-12', '>=') - name: Copy the bridge script - Creates br0 template: