From ef67c61cf7d003c1a56f1f80e7ab0ed5a7bfe01d Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Mon, 22 Jun 2026 12:46:31 +0800 Subject: [PATCH] fix(xfce): skip Linux XFCE/XRDP desktop stack on macOS The all-in-one flow reached "Update apt cache" in the xfce_desktop_minimal_runtime role on macOS and failed with `[Errno 2] No such file or directory: b'update'` (no apt on Darwin). XFCE + XRDP is a Linux remote-desktop stack and is meaningless on macOS, which already has a native GUI. Guard both role includes in setup-xfce-xrdp.yaml with `ansible_os_family != 'Darwin'` so the apt/systemd tasks never run there. Linux behavior is unchanged. Co-Authored-By: Claude Opus 4.8 --- setup-xfce-xrdp.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup-xfce-xrdp.yaml b/setup-xfce-xrdp.yaml index 1304426..ae0e07a 100644 --- a/setup-xfce-xrdp.yaml +++ b/setup-xfce-xrdp.yaml @@ -9,9 +9,13 @@ vars: xworkspace_console_enable_xrdp: false tasks: + # XFCE/XRDP is a Linux remote-desktop stack (apt-based, systemd) and is not + # applicable to macOS, which already has a native GUI. Skip the whole stack + # on Darwin so the apt-driven tasks never run there. - name: Include XFCE desktop runtime role ansible.builtin.include_role: name: roles/vhosts/xfce_desktop_minimal_runtime + when: ansible_os_family != 'Darwin' - name: Include XRDP server role when enabled ansible.builtin.include_role: @@ -23,4 +27,6 @@ xfce_user_groups: - sudo - docker - when: xworkspace_console_enable_xrdp | bool + when: + - ansible_os_family != 'Darwin' + - xworkspace_console_enable_xrdp | bool