ansible-nas/tasks/airsonic.yml

31 lines
914 B
YAML
Raw Normal View History

2019-01-03 15:10:39 +00:00
---
- name: Create Airsonic Directories
file:
path: "{{ item }}"
state: directory
# mode: 0755
with_items:
- "{{ airsonic_data_directory }}/data"
- "{{ airsonic_data_directory }}/playlists"
- name: Airsonic Docker Container
docker_container:
name: airsonic
image: airsonic/airsonic:latest
pull: true
volumes:
- "{{ airsonic_data_directory }}/data:/airsonic/data:rw"
- "{{ airsonic_data_directory }}/playlists:/airsonic/playlists:rw"
- "{{ airsonic_music_directory }}:/airsonic/music:rw"
- "{{ airsonic_podcasts_directory }}:/airsonic/podcasts:rw"
2019-01-03 15:10:39 +00:00
ports:
- "{{ airsonic_port }}:4040"
restart_policy: unless-stopped
memory: 1g
2019-01-03 15:10:39 +00:00
labels:
traefik.backend: "airsonic"
traefik.frontend.rule: "Host:airsonic.{{ ansible_nas_domain }}"
traefik.enable: "{{ airsonic_available_externally }}"
2019-01-03 15:10:39 +00:00
traefik.port: "4040"