ansible-nas/tasks/youtubedlmaterial.yml
2021-02-21 19:50:07 +00:00

38 lines
1.6 KiB
YAML

---
- name: YouTubeDL-Material Directory
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ youtubedlmaterial_data_directory }}/appdata"
- "{{ youtubedlmaterial_data_directory }}/audio"
- "{{ youtubedlmaterial_data_directory }}/video"
- "{{ youtubedlmaterial_data_directory }}/subscriptions"
- "{{ youtubedlmaterial_dl_audio_directory }}"
- "{{ youtubedlmaterial_dl_video_directory }}"
- "{{ youtubedlmaterial_dl_subscriptions_directory }}"
- name: YouTubeDL-Material Docker Container
docker_container:
name: youtubedlmaterial
image: tzahi12345/youtubedl-material:latest
pull: true
volumes:
- "{{ youtubedlmaterial_data_directory }}/appdata:/app/appdata:rw"
- "{{ youtubedlmaterial_dl_audio_directory }}:/app/audio:rw"
- "{{ youtubedlmaterial_dl_video_directory }}:/app/video:rw"
- "{{ youtubedlmaterial_dl_subscriptions_directory }}:/app/subscriptions:rw"
ports:
- "{{ youtubedlmaterial_port_http }}:17442"
env:
ALLOW_CONFIG_MUTATIONS: "true"
TZ: "{{ ansible_nas_timezone }}"
restart_policy: always
memory: 1g
labels:
traefik.enable: "{{ youtubedlmaterial_available_externally }}"
traefik.http.routers.youtubedlmaterial.rule: "Host(`youtubedlmaterial.{{ ansible_nas_domain }}`)"
traefik.http.routers.youtubedlmaterial.tls.certresolver: "letsencrypt"
traefik.http.routers.youtubedlmaterial.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.youtubedlmaterial.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.youtubedlmaterial.loadbalancer.server.port: "17442"