ansible-nas/roles/deluge/tasks/main.yml
PurpleNinja225 765650e2c8 add deluge
2021-01-27 23:16:54 -09:00

33 lines
No EOL
1.1 KiB
YAML

---
- name: Create Deluge Directories
file:
path: "{{ item }}"
state: directory
# mode: 0755
with_items:
- "{{ deluge_config_directory }}"
- "{{ deluge_download_directory }}"
- name: Deluge Docker Container
docker_container:
name: deluge
image: linuxserver/deluge
pull: true
volumes:
- "{{ deluge_config_directory }}:/config:rw"
- "{{ deluge_download_directory }}:/root/Downloads:rw"
ports:
- "{{ deluge_port }}:8112"
env:
TZ: "{{ deluge_timezone }}"
PUID: "{{ deluge_user_id }}"
PGID: "{{ deluge_group_id }}"
restart_policy: unless-stopped
memory: 1g
labels:
traefik.enable: "{{ deluge_available_externally }}"
traefik.http.routers.deluge.rule: "Host(`{{ deluge_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.deluge.tls.certresolver: "letsencrypt"
traefik.http.routers.deluge.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.deluge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.deluge.loadbalancer.server.port: "8112"