34 lines
745 B
YAML
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
|