From b1b137d15bd7d7d32882ecef0372aabc20623dfb Mon Sep 17 00:00:00 2001 From: polyfloyd Date: Sun, 14 Apr 2024 22:35:09 +0200 Subject: [PATCH] music: Add new skipbutton service --- roles/music/handlers/main.yaml | 6 ++++++ roles/music/tasks/mpd.yaml | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/roles/music/handlers/main.yaml b/roles/music/handlers/main.yaml index a1b1b18..4dea39a 100644 --- a/roles/music/handlers/main.yaml +++ b/roles/music/handlers/main.yaml @@ -29,3 +29,9 @@ name: mpd-volume-to-mqtt state: restarted daemon_reload: true + +- name: restart skipbutton + systemd: + name: skipbutton + state: restarted + daemon_reload: true diff --git a/roles/music/tasks/mpd.yaml b/roles/music/tasks/mpd.yaml index 31aa7a9..5ea6a27 100644 --- a/roles/music/tasks/mpd.yaml +++ b/roles/music/tasks/mpd.yaml @@ -4,6 +4,8 @@ name: - jackd - mpd + - python3-mpd + - python3-serial state: present - name: Install mpd-volume-to-mqtt script @@ -30,3 +32,27 @@ state: started enabled: true daemon_reload: true + +- name: Clone skipbutton source + git: + repo: https://github.com/bitlair/skipbutton.git + version: master + dest: /opt/skipbutton + accept_hostkey: yes + notify: restart skipbutton + +- name: Install skipbutton service + template: + src: skipbutton.service + dest: /etc/systemd/system/skipbutton.service + owner: root + group: root + mode: 0644 + notify: restart skipbutton + +- name: Enable skipbutton + systemd: + name: skipbutton + state: started + enabled: true + daemon_reload: true