+ Subsonic reverse proxy configuration & ansible vars
These are the last pieces required to build out subsonic
This commit is contained in:
37
docker-host/setup/tasks/subsonic.yml
Normal file
37
docker-host/setup/tasks/subsonic.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
# This playbook sets up subsonic with/without a fresh to work with
|
||||
---
|
||||
- hosts: leftcoastlab
|
||||
become: yes
|
||||
vars:
|
||||
SUBSONIC_DIR: /opt/subsonic/data
|
||||
SUBSONIC_CONFIG_VOL: subsonic-config-volume
|
||||
tasks:
|
||||
- name: Include Vars
|
||||
include_vars:
|
||||
dir: ../vars
|
||||
|
||||
|
||||
- name: Ensure Subsonic music directory exists
|
||||
file:
|
||||
path: "{{SUBSONIC_DIR}}"
|
||||
state: directory
|
||||
|
||||
- name: Ensure Subsonic configuration volume exists
|
||||
community.docker.docker_volume:
|
||||
name: "{{SUBSONIC_CONFIG_VOL}}"
|
||||
state: present
|
||||
|
||||
- name: Deploy Subsonic container
|
||||
community.docker.docker_container:
|
||||
name: subsonic
|
||||
image: gzurowski/subsonic
|
||||
restart_policy: always
|
||||
recreate: yes
|
||||
ports:
|
||||
- "{{SUBSONIC_PORT}}:4040"
|
||||
volumes:
|
||||
- "{{SUBSONIC_DIR}}:/var/music"
|
||||
log_driver: loki
|
||||
log_options:
|
||||
loki-url: "http://localhost:{{LOKI_PORT}}/loki/api/v1/push"
|
||||
|
||||
Reference in New Issue
Block a user