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