ref(playbook): Change to role-based structure
This commit is contained in:
parent
95fd68bed8
commit
b3b280fbe4
39 changed files with 635 additions and 601 deletions
49
roles/pipewire/tasks/main.yaml
Normal file
49
roles/pipewire/tasks/main.yaml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
- name: Ensure user group for audio/video exists
|
||||
ansible.builtin.group:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop: "{{ audio_groups }}"
|
||||
|
||||
- name: Put user in audio group
|
||||
ansible.builtin.user:
|
||||
name: "{{ user_name }}"
|
||||
groups: "{{ audio_groups }}"
|
||||
append: true
|
||||
|
||||
- name: Install pipewire
|
||||
community.general.xbps:
|
||||
name:
|
||||
- pipewire
|
||||
state: present
|
||||
tags: packages
|
||||
|
||||
- name: Install pipewire bluetooth
|
||||
community.general.xbps:
|
||||
name:
|
||||
- libspa-bluetooth
|
||||
state: present
|
||||
tags:
|
||||
- packages
|
||||
- bluetooth
|
||||
|
||||
- name: Set up wireplumber to auto start
|
||||
ansible.builtin.file:
|
||||
dest: "/etc/pipewire/pipewire.conf.d"
|
||||
state: directory
|
||||
|
||||
# FIXME: Does not work automatically for some reason?
|
||||
- name: Set up wireplumber to auto start
|
||||
ansible.builtin.file:
|
||||
force: "yes"
|
||||
src: "/usr/share/examples/wireplumber/10-wireplumber.conf"
|
||||
dest: "/etc/pipewire/pipewire.conf.d/10-wireplumber.conf"
|
||||
state: link
|
||||
|
||||
- name: Enable pipewire-pulse interface
|
||||
ansible.builtin.file:
|
||||
force: "yes"
|
||||
src: "/usr/share/examples/pipewire/20-pipewire-pulse.conf"
|
||||
dest: "/etc/pipewire/pipewire.conf.d/20-pipewire-pulse.conf"
|
||||
state: link
|
||||
|
||||
# TODO: Find way to install and enable pipewire-roc-sink module (and enable ~/.config/pipewire/pipewire.conf.d/roc-sink.conf)
|
||||
4
roles/pipewire/vars/main.yaml
Normal file
4
roles/pipewire/vars/main.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
audio_groups:
|
||||
- audio
|
||||
- video
|
||||
Loading…
Add table
Add a link
Reference in a new issue