Add a role to install Trollibox
This commit is contained in:
parent
1c9a0b37d3
commit
f24e8b6436
4 changed files with 36 additions and 0 deletions
3
hosts
3
hosts
|
@ -3,3 +3,6 @@ bank-pi.bitlair.nl
|
||||||
|
|
||||||
[mqtt_internal]
|
[mqtt_internal]
|
||||||
mqtt.bitlair.nl
|
mqtt.bitlair.nl
|
||||||
|
|
||||||
|
[music]
|
||||||
|
music.bitlair.nl
|
||||||
|
|
17
roles/music/handlers/main.yaml
Normal file
17
roles/music/handlers/main.yaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
- name: reload nginx
|
||||||
|
systemd:
|
||||||
|
name: nginx
|
||||||
|
state: reloaded
|
||||||
|
|
||||||
|
- name: rebuild trollibox
|
||||||
|
command: ./build.sh
|
||||||
|
args:
|
||||||
|
chdir: /opt/trollibox
|
||||||
|
environment: { RELEASE: 1 }
|
||||||
|
|
||||||
|
- name: restart trollibox
|
||||||
|
systemd:
|
||||||
|
name: trollibox
|
||||||
|
state: restarted
|
||||||
|
daemon_reload: true
|
3
roles/music/tasks/main.yaml
Normal file
3
roles/music/tasks/main.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
- tags: music_trollibox
|
||||||
|
include: trollibox.yaml
|
13
roles/music/tasks/trollibox.yaml
Normal file
13
roles/music/tasks/trollibox.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
- name: Clone trollibox source
|
||||||
|
git:
|
||||||
|
repo: https://github.com/polyfloyd/trollibox.git
|
||||||
|
version: master
|
||||||
|
dest: /opt/trollibox
|
||||||
|
accept_hostkey: yes
|
||||||
|
notify:
|
||||||
|
- rebuild trollibox
|
||||||
|
- restart trollibox
|
||||||
|
|
||||||
|
- name: Initial build
|
||||||
|
meta: flush_handlers
|
Loading…
Add table
Reference in a new issue