music: Add the base audio server
Some checks failed
Test / build (push) Failing after 59s

This commit is contained in:
polyfloyd 2025-05-14 23:45:03 +02:00
parent 7cd44bbe53
commit 6927806972
5 changed files with 51 additions and 3 deletions

View file

@ -0,0 +1,42 @@
---
- name: Install pipewire
apt:
name:
- pipewire
- pipewire-jack
- pipewire-pulse
- pulseaudio-utils
- pulsemixer
state: present
- name: Add audio group
group:
name: audio
system: true
- name: Set PULSE_SERVER env var for all shells
copy:
dest: /etc/profile.d/pulse-server.sh
content: |+
# Ansible managed
export PULSE_SERVER={{ music_pulse_server }}
- name: Create pipewire-pulse config dir
file:
path: /etc/pipewire/pipewire-pulse.conf.d/
state: directory
- name: Configure system socket
ansible.builtin.copy:
dest: /etc/pipewire/pipewire-pulse.conf.d/system-socket.conf
content: |+
# Ansible managed
context.exec = [
{ path = "/bin/chgrp" args = "{{ music_audio_group }} {{ music_pulse_server }}" }
{ path = "/bin/chmod" args = "g+rwx,o-rwx {{ music_pulse_server }}" }
]
pulse.properties = {
server.address = [
"unix:{{ music_pulse_server }}"
]
}