music: Install Trollibox from Github release
This commit is contained in:
parent
2a54ec3ec6
commit
6bf0fdbba3
3 changed files with 19 additions and 15 deletions
|
@ -1,9 +1,9 @@
|
||||||
---
|
---
|
||||||
- tags: music_mpd
|
- tags: music_mpd
|
||||||
include_tasks: mpd.yaml
|
import_tasks: mpd.yaml
|
||||||
|
|
||||||
- tags: music_trollibox
|
- tags: music_trollibox
|
||||||
include_tasks: trollibox.yaml
|
import_tasks: trollibox.yaml
|
||||||
|
|
||||||
- tags: music_librespot
|
- tags: music_librespot
|
||||||
include_tasks: librespot.yaml
|
import_tasks: librespot.yaml
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
---
|
---
|
||||||
- name: Clone trollibox source
|
- name: Get latest Trollibox version from Github API
|
||||||
git:
|
get_url:
|
||||||
repo: https://github.com/polyfloyd/trollibox.git
|
url: "https://api.github.com/repos/polyfloyd/trollibox/releases/latest"
|
||||||
version: master
|
dest: "/tmp/_ansible_trollibox_latest_release.json"
|
||||||
dest: /opt/trollibox
|
|
||||||
accept_hostkey: yes
|
|
||||||
notify:
|
|
||||||
- rebuild trollibox
|
|
||||||
- restart trollibox
|
|
||||||
|
|
||||||
- name: Initial build
|
- name: Get download url
|
||||||
meta: flush_handlers
|
shell: 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:
|
||||||
|
src: "{{ trollibox_download_url.stdout }}"
|
||||||
|
remote_src: yes
|
||||||
|
dest: /usr/local/bin
|
||||||
|
include: [ trollibox ]
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
- name: Install service file
|
- name: Install service file
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -11,7 +11,7 @@ Requires=mpd.service
|
||||||
Type=simple
|
Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=2s
|
RestartSec=2s
|
||||||
ExecStart=/opt/trollibox/bin/trollibox -conf /etc/trollibox.yaml
|
ExecStart=/usr/local/bin/trollibox -conf /etc/trollibox.yaml
|
||||||
User={{ music_audio_user }}
|
User={{ music_audio_user }}
|
||||||
Group={{ music_audio_user }}
|
Group={{ music_audio_user }}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue