1
0
Fork 0
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:
Matt Layher 2016-04-19 21:14:30 -04:00
parent c460455898
commit e49fcb7231
No known key found for this signature in database
GPG key ID: 77BFE531397EDE94
4 changed files with 49 additions and 0 deletions

View 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

View 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"

View file

@ -0,0 +1,4 @@
---
subsonic_url: "http://subsonic.org/download/subsonic-5.3.deb"
subsonic_deb: "/tmp/subsonic.deb"
subsonic_sha256: "ff161159e5a3ae7f70e79cba59c3321b1889efbfad101ecb1eadf7ed4f47125a"

View file

@ -7,3 +7,4 @@
- plex - plex
- prometheus - prometheus
- rtorrent - rtorrent
- subsonic