2017-08-28 15:31:54 +00:00
|
|
|
---
|
|
|
|
- name: Create Sonarr Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- "{{ sonarr_data_directory }}"
|
|
|
|
|
|
|
|
- name: Sonarr
|
|
|
|
docker_container:
|
|
|
|
name: sonarr
|
|
|
|
image: linuxserver/sonarr
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ sonarr_tv_directory }}:/tv:rw"
|
2021-08-20 15:45:39 +00:00
|
|
|
- "{{ sonarr_download_directory }}:/downloads:rw"
|
2017-08-28 15:31:54 +00:00
|
|
|
- "{{ sonarr_data_directory }}:/config:rw"
|
|
|
|
ports:
|
2020-01-05 21:47:40 +00:00
|
|
|
- "{{ sonarr_port }}:8989"
|
2017-08-28 15:31:54 +00:00
|
|
|
env:
|
2018-11-12 22:30:13 +00:00
|
|
|
TZ: "{{ ansible_nas_timezone }}"
|
2017-08-28 15:31:54 +00:00
|
|
|
PUID: "{{ sonarr_user_id }}"
|
|
|
|
PGID: "{{ sonarr_group_id }}"
|
|
|
|
restart_policy: unless-stopped
|
2021-02-23 15:16:29 +00:00
|
|
|
memory: "{{ sonarr_memory }}"
|
2019-04-11 22:03:11 +00:00
|
|
|
labels:
|
|
|
|
traefik.enable: "{{ sonarr_available_externally }}"
|
2021-01-22 15:35:08 +00:00
|
|
|
traefik.http.routers.sonarr.rule: "Host(`{{ sonarr_hostname }}.{{ ansible_nas_domain }}`)"
|
2021-01-19 23:51:59 +00:00
|
|
|
traefik.http.routers.sonarr.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.sonarr.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.sonarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
2021-02-21 19:50:07 +00:00
|
|
|
traefik.http.services.sonarr.loadbalancer.server.port: "8989"
|