ansible/roles/music/handlers/main.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

86 lines
1.8 KiB
YAML

---
- ansible.builtin.import_tasks:
file: ../../common/handlers/main.yaml
- name: restart pipewire
become: true
become_user: "{{ music_audio_user }}"
become_method: machinectl
ansible.builtin.systemd:
name: pipewire
state: restarted
daemon_reload: true
scope: user
- name: restart filter-chain
become: true
become_user: "{{ music_audio_user }}"
become_method: machinectl
ansible.builtin.systemd:
name: filter-chain
state: restarted
daemon_reload: true
scope: user
- name: restart bitvis
ansible.builtin.systemd:
name: bitvis
state: restarted
daemon_reload: true
- name: restart bitvis-tee
ansible.builtin.systemd:
name: bitvis-tee
state: restarted
daemon_reload: true
- name: restart mpd
ansible.builtin.systemd:
name: mpd
state: restarted
daemon_reload: true
- name: restart trollibox
ansible.builtin.systemd:
name: trollibox
state: restarted
daemon_reload: true
- name: rebuild librespot
ansible.builtin.command:
cmd: /root/.cargo/bin/cargo build --release --features pulseaudio-backend,jackaudio-backend
args:
chdir: /opt/librespot
- name: restart librespot
ansible.builtin.systemd:
name: librespot
state: restarted
daemon_reload: true
- name: Restart soundboard
ansible.builtin.systemd:
name: soundboard
state: restarted
daemon_reload: true
- name: Restart mpd-volume-to-mqtt
ansible.builtin.systemd:
name: mpd-volume-to-mqtt
state: restarted
daemon_reload: true
- name: Restart skipbutton
ansible.builtin.systemd:
name: skipbutton
state: restarted
daemon_reload: true
- name: restart ampswitch
ansible.builtin.systemd:
name: "ampswitch-{{ item }}"
state: restarted
daemon_reload: true
with_items:
- librespot
- mpd