mirror of
https://github.com/mdlayher/homelab.git
synced 2024-12-15 17:50:54 +00:00
subsonic: initial commit
This commit is contained in:
parent
c460455898
commit
e49fcb7231
4 changed files with 49 additions and 0 deletions
35
roles/subsonic/tasks/main.yml
Normal file
35
roles/subsonic/tasks/main.yml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
---
|
||||||
|
- name: install java runtime
|
||||||
|
tags:
|
||||||
|
- subsonic
|
||||||
|
apt: pkg=openjdk-7-jre state=installed
|
||||||
|
|
||||||
|
- name: create subsonic user
|
||||||
|
tags:
|
||||||
|
- subsonic
|
||||||
|
user: name=subsonic shell=/bin/false comment="subsonic service user"
|
||||||
|
|
||||||
|
- name: download and checksum subsonic debian package
|
||||||
|
tags:
|
||||||
|
- subsonic
|
||||||
|
get_url: url={{ subsonic_url }} dest={{ subsonic_deb }} checksum=sha256:{{ subsonic_sha256 }}
|
||||||
|
|
||||||
|
- name: install subsonic
|
||||||
|
tags:
|
||||||
|
- subsonic
|
||||||
|
apt: deb={{ subsonic_deb }} state=installed
|
||||||
|
|
||||||
|
- name: write subsonic configuration
|
||||||
|
tags:
|
||||||
|
- subsonic
|
||||||
|
template: src=subsonic.j2 dest=/etc/default/subsonic
|
||||||
|
|
||||||
|
- name: restart subsonic service
|
||||||
|
tags:
|
||||||
|
- subsonic
|
||||||
|
service: name=subsonic state=restarted enabled=yes
|
||||||
|
|
||||||
|
- name: remove temporary subsonic debian package
|
||||||
|
tags:
|
||||||
|
- subsonic
|
||||||
|
file: path={{ subsonic_deb }} state=absent
|
9
roles/subsonic/templates/subsonic.j2
Normal file
9
roles/subsonic/templates/subsonic.j2
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
# subsonic configuration, Matt Layher, 2016-04-19
|
||||||
|
|
||||||
|
{% if subsonic_args is defined %}
|
||||||
|
SUBSONIC_ARGS="{{ subsonic_args }}"
|
||||||
|
{% else %}
|
||||||
|
SUBSONIC_ARGS="--max-memory=150"
|
||||||
|
{% endif %}
|
||||||
|
SUBSONIC_USER="subsonic"
|
4
roles/subsonic/vars/main.yml
Normal file
4
roles/subsonic/vars/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
subsonic_url: "http://subsonic.org/download/subsonic-5.3.deb"
|
||||||
|
subsonic_deb: "/tmp/subsonic.deb"
|
||||||
|
subsonic_sha256: "ff161159e5a3ae7f70e79cba59c3321b1889efbfad101ecb1eadf7ed4f47125a"
|
|
@ -7,3 +7,4 @@
|
||||||
- plex
|
- plex
|
||||||
- prometheus
|
- prometheus
|
||||||
- rtorrent
|
- rtorrent
|
||||||
|
- subsonic
|
||||||
|
|
Loading…
Reference in a new issue