This commit is contained in:
parent
7cd44bbe53
commit
6927806972
5 changed files with 51 additions and 3 deletions
42
roles/music/tasks/base.yaml
Normal file
42
roles/music/tasks/base.yaml
Normal 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 }}"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue