Automated changes from linter ;P

This commit is contained in:
Mark Janssen 2024-07-11 20:47:52 +02:00
parent 44b73a216f
commit f7f04e7a41
Signed by: foobar
GPG key ID: D8674D8FC4F69BD2
65 changed files with 392 additions and 324 deletions

View file

@ -1,37 +1,39 @@
---
- import_tasks: ../../common/handlers/main.yaml
- ansible.builtin.import_tasks:
file: ../../common/handlers/main.yaml
- name: restart trollibox
systemd:
ansible.builtin.systemd:
name: trollibox
state: restarted
daemon_reload: true
- name: rebuild librespot
command: /root/.cargo/bin/cargo build --release --features jackaudio-backend
ansible.builtin.command:
cmd: /root/.cargo/bin/cargo build --release --features jackaudio-backend
args:
chdir: /opt/librespot
- name: restart librespot
systemd:
ansible.builtin.systemd:
name: librespot
state: restarted
daemon_reload: true
- name: restart soundboard
systemd:
ansible.builtin.systemd:
name: soundboard
state: restarted
daemon_reload: true
- name: restart mpd-volume-to-mqtt
systemd:
ansible.builtin.systemd:
name: mpd-volume-to-mqtt
state: restarted
daemon_reload: true
- name: restart skipbutton
systemd:
ansible.builtin.systemd:
name: skipbutton
state: restarted
daemon_reload: true

View file

@ -1,11 +1,11 @@
---
- name: Install dependencies
apt:
ansible.builtin.apt:
name: libjack-jackd2-dev
state: present
- name: Clone librespot source
git:
ansible.builtin.git:
repo: https://github.com/librespot-org/librespot.git
version: dev
dest: /opt/librespot
@ -15,7 +15,7 @@
- restart librespot
- name: Install service file
template:
ansible.builtin.template:
src: librespot.service
dest: /etc/systemd/system/librespot.service
owner: root
@ -24,7 +24,7 @@
notify: restart librespot
- name: Enable Librespot
systemd:
ansible.builtin.systemd:
name: librespot
state: started
enabled: true

View file

@ -1,22 +1,27 @@
---
- tags: music_mpd
import_tasks: mpd.yaml
ansible.builtin.import_tasks:
file: mpd.yaml
- tags: music_trollibox
import_tasks: trollibox.yaml
ansible.builtin.import_tasks:
file: trollibox.yaml
- tags: music_librespot
import_tasks: librespot.yaml
ansible.builtin.import_tasks:
file: librespot.yaml
- tags: music_soundboard
import_tasks: soundboard.yaml
ansible.builtin.import_tasks:
file: soundboard.yaml
- tags: music
block:
- import_tasks: ../../../snippets/common-nginx.yaml
- ansible.builtin.import_tasks:
file: ../../../snippets/common-nginx.yaml
- name: Install nginx config
template:
ansible.builtin.template:
src: nginx-site.conf
dest: /etc/nginx/sites-enabled/trollibox
owner: root

View file

@ -1,6 +1,6 @@
---
- name: Install MPD
apt:
ansible.builtin.apt:
name:
- jackd
- mpd
@ -9,7 +9,7 @@
state: present
- name: Install mpd-volume-to-mqtt script
template:
ansible.builtin.template:
src: mpd-volume-to-mqtt.sh
dest: /opt/mpd-volume-to-mqtt.sh
owner: root
@ -18,7 +18,7 @@
notify: restart mpd-volume-to-mqtt
- name: Install mpd-volume-to-mqtt service
template:
ansible.builtin.template:
src: mpd-volume-to-mqtt.service
dest: /etc/systemd/system/mpd-volume-to-mqtt.service
owner: root
@ -27,14 +27,14 @@
notify: restart mpd-volume-to-mqtt
- name: Enable mpd-volume-to-mqtt
systemd:
ansible.builtin.systemd:
name: mpd-volume-to-mqtt
state: started
enabled: true
daemon_reload: true
- name: Clone skipbutton source
git:
ansible.builtin.git:
repo: https://github.com/bitlair/skipbutton.git
version: master
dest: /opt/skipbutton
@ -42,7 +42,7 @@
notify: restart skipbutton
- name: Install skipbutton service
template:
ansible.builtin.template:
src: skipbutton.service
dest: /etc/systemd/system/skipbutton.service
owner: root
@ -51,7 +51,7 @@
notify: restart skipbutton
- name: Enable skipbutton
systemd:
ansible.builtin.systemd:
name: skipbutton
state: started
enabled: true

View file

@ -1,11 +1,11 @@
---
- name: Install dependencies
apt:
ansible.builtin.apt:
name: virtualenv
state: present
- name: Clone soundboard source
git:
ansible.builtin.git:
repo: https://github.com/polyfloyd/mqtt-soundboard.git
version: main
dest: /opt/soundboard
@ -13,17 +13,19 @@
notify: restart soundboard
- name: Create virtualenv
command: virtualenv /opt/soundboard/.venv
ansible.builtin.command:
cmd: virtualenv /opt/soundboard/.venv
args:
creates: /opt/soundboard/.venv
- name: Install Python dependencies
shell: . .venv/bin/activate && pip install -r requirements.txt
ansible.builtin.shell:
cmd: . .venv/bin/activate && pip install -r requirements.txt
args:
chdir: /opt/soundboard
- name: Install soundboard config file
template:
ansible.builtin.template:
src: soundboard.yaml
dest: /etc/soundboard.yaml
owner: root
@ -32,7 +34,7 @@
notify: restart soundboard
- name: Install soundboard service file
template:
ansible.builtin.template:
src: soundboard.service
dest: /etc/systemd/system/soundboard.service
owner: root
@ -41,7 +43,7 @@
notify: restart soundboard
- name: Enable soundboard
systemd:
ansible.builtin.systemd:
name: soundboard
state: started
enabled: true

View file

@ -1,6 +1,6 @@
---
- name: Install Trollibox config
template:
ansible.builtin.template:
src: trollibox.yaml
dest: /etc/trollibox.yaml
owner: root
@ -9,16 +9,18 @@
notify: restart trollibox
- name: Get latest Trollibox version from Github API
get_url:
ansible.builtin.get_url:
url: "https://api.github.com/repos/polyfloyd/trollibox/releases/latest"
dest: "/tmp/_ansible_trollibox_latest_release.json"
- name: Get download url
shell: cat "/tmp/_ansible_trollibox_latest_release.json" | jq '.assets[] | select(.name | contains("linux-amd64")) | .browser_download_url' -r
ansible.builtin.shell:
cmd: cat /tmp/_ansible_trollibox_latest_release.json | jq .assets[] | select(.name
| contains("linux-amd64")) | .browser_download_url -r
register: "trollibox_download_url"
- name: Download Trollibox
unarchive:
ansible.builtin.unarchive:
src: "{{ trollibox_download_url.stdout }}"
remote_src: yes
dest: /usr/local/bin
@ -27,7 +29,7 @@
notify: restart trollibox
- name: Install service file
template:
ansible.builtin.template:
src: trollibox.service
dest: /etc/systemd/system/trollibox.service
owner: root
@ -36,7 +38,7 @@
notify: restart trollibox
- name: Enable Trollibox
systemd:
ansible.builtin.systemd:
name: trollibox
state: started
enabled: true