music: Install mqtt-soundboard from Debian package
Some checks failed
Test / build (push) Failing after 56s
Some checks failed
Test / build (push) Failing after 56s
This commit is contained in:
parent
ee6b8bee5c
commit
5ab22d0e96
2 changed files with 10 additions and 29 deletions
|
@ -4,6 +4,7 @@
|
|||
roles:
|
||||
- { role: "common", tags: [ "common" ] }
|
||||
- { role: "acme", tags: [ "acme" ] }
|
||||
- { role: "deb_forgejo", tags: [ "deb_forgejo" ] }
|
||||
- { role: "go", tags: [ "go" ] }
|
||||
# - { role: "nginx", tags: [ "nginx" ] }
|
||||
- { role: "music", tags: [ "music" ] }
|
||||
|
|
|
@ -1,28 +1,17 @@
|
|||
---
|
||||
- name: Install dependencies
|
||||
ansible.builtin.apt:
|
||||
name: virtualenv
|
||||
name:
|
||||
- mqtt-soundboard
|
||||
- mplayer
|
||||
state: present
|
||||
|
||||
- name: Clone soundboard source
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/polyfloyd/mqtt-soundboard.git
|
||||
version: main
|
||||
dest: /opt/soundboard
|
||||
accept_hostkey: yes
|
||||
notify: Restart soundboard
|
||||
|
||||
- name: Create virtualenv
|
||||
ansible.builtin.command:
|
||||
cmd: virtualenv /opt/soundboard/.venv
|
||||
args:
|
||||
creates: /opt/soundboard/.venv
|
||||
|
||||
- name: Install Python dependencies
|
||||
ansible.builtin.shell:
|
||||
cmd: . .venv/bin/activate && pip install -r requirements.txt
|
||||
args:
|
||||
chdir: /opt/soundboard
|
||||
- ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- /opt/soundboard
|
||||
- /etc/systemd/system/soundboard.service
|
||||
|
||||
- name: Install soundboard config file
|
||||
ansible.builtin.template:
|
||||
|
@ -33,15 +22,6 @@
|
|||
mode: 0644
|
||||
notify: Restart soundboard
|
||||
|
||||
- name: Install soundboard service file
|
||||
ansible.builtin.template:
|
||||
src: soundboard.service
|
||||
dest: /etc/systemd/system/soundboard.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: Restart soundboard
|
||||
|
||||
- name: Enable soundboard
|
||||
ansible.builtin.systemd:
|
||||
name: soundboard
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue