ansible/roles/music/tasks/ampswitch.yaml
polyfloyd c784d4d217
Some checks failed
Test / build (push) Failing after 55s
music: Set up ampswitch for MPD and Librespot
2025-06-01 22:43:04 +02:00

34 lines
745 B
YAML

---
- name: Install ampswitch depencies
apt:
name:
- libboost-dev
- libboost-dev
- nlohmann-json3-dev
- name: Install ampswitch service file
template:
src: ampswitch.service
dest: /etc/systemd/system/ampswitch-{{ item.instance }}.service
owner: root
group: root
mode: 0755
with_items:
- instance: mpd
pw_inputs:
- "Music Player Daemon:output_FL"
- "Music Player Daemon:output_FR"
- instance: librespot
pw_inputs:
- "librespot:out_0"
- "librespot:out_1"
notify: restart ampswitch
- name: Enable ampswitch
ansible.builtin.systemd:
name: "ampswitch-{{ item }}"
state: started
enabled: true
with_items:
- librespot
- mpd