From 4919d96007d0d55aebaca6d9e73d2ee3cd193a9a Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Sat, 10 Jan 2026 01:03:27 +0100 Subject: It's probably not required to have the services restarted on every run This simplifies the service and make sure that it is started (not restarted), and mask the pulseaudio as per another tutorial recommendations, than the one used for installing --- roles/pipewire/tasks/main.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/roles/pipewire/tasks/main.yml b/roles/pipewire/tasks/main.yml index 870ec6f3..37293677 100644 --- a/roles/pipewire/tasks/main.yml +++ b/roles/pipewire/tasks/main.yml @@ -2,17 +2,20 @@ - name: "Include OS-specific tasks" ansible.builtin.include_tasks: "install-{{ ansible_os_family | lower }}.yml" +- name: "Ensure pulseaudio services are masked" + ansible.builtin.systemd_service: + name: "pulseaudio" + masked: true + state: "stopped" + scope: "user" + - name: "Ensure pipewire services are restarted" ansible.builtin.systemd_service: name: "{{ item }}" enabled: "true" - state: "restarted" + state: "started" scope: "user" loop: - "pipewire" - "pipewire-pulse" - "wireplumber" - tags: - # Since this is the recommended way for ensuring the services are started - # must be ignored from idempotence testing because it always reports changed - - molecule-idempotence-notest -- cgit v1.2.3