ansible/roles/music/tasks/ampswitch.yaml
polyfloyd 5ada26be13
Some checks failed
Test / build (push) Failing after 58s
music/ampswitch: Install from apt
2025-06-05 16:32:26 +02:00

31 lines
676 B
YAML

---
- name: Install ampswitch
apt:
name: ampswitch
- 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