2019-05-06 20:55:40 +00:00
|
|
|
---
|
|
|
|
- name: Create pyLoad Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
# mode: 0755
|
|
|
|
with_items:
|
|
|
|
- "{{ pyload_config_directory }}"
|
|
|
|
- "{{ pyload_download_directory }}"
|
|
|
|
|
|
|
|
- name: pyLoad Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: pyload
|
|
|
|
image: writl/pyload
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ pyload_config_directory }}:/opt/pyload/pyload-config:rw"
|
|
|
|
- "{{ pyload_download_directory }}:/opt/pyload/Downloads:rw"
|
|
|
|
ports:
|
2020-01-05 21:47:40 +00:00
|
|
|
- "{{ pyload_port }}:8000"
|
2019-05-06 20:55:40 +00:00
|
|
|
env:
|
|
|
|
TZ: "{{ ansible_nas_timezone }}"
|
|
|
|
UID: "{{ pyload_user_id }}"
|
|
|
|
GID: "{{ pyload_group_id }}"
|
|
|
|
restart_policy: unless-stopped
|
2021-01-29 09:08:36 +00:00
|
|
|
memory: "{{ pyload_memory }}"
|
2019-05-06 20:55:40 +00:00
|
|
|
labels:
|
|
|
|
traefik.enable: "{{ pyload_available_externally }}"
|
2021-01-29 09:08:36 +00:00
|
|
|
traefik.http.routers.pyload.rule: "Host(`{{ pyload_hostname }}.{{ ansible_nas_domain }}`)"
|
2021-01-19 23:51:59 +00:00
|
|
|
traefik.http.routers.pyload.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.pyload.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.pyload.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.services.pyload.loadbalancer.server.port: "8000"
|