mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-26 11:33:08 +00:00
32 lines
No EOL
1.1 KiB
YAML
32 lines
No EOL
1.1 KiB
YAML
---
|
|
- 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"
|
|
- "{{ sonarr_download_directory }}/complete:/downloads:rw"
|
|
- "{{ sonarr_data_directory }}:/config:rw"
|
|
ports:
|
|
- "{{ sonarr_port }}:8989"
|
|
env:
|
|
TZ: "{{ ansible_nas_timezone }}"
|
|
PUID: "{{ sonarr_user_id }}"
|
|
PGID: "{{ sonarr_group_id }}"
|
|
restart_policy: unless-stopped
|
|
memory: 1g
|
|
labels:
|
|
traefik.enable: "{{ sonarr_available_externally }}"
|
|
traefik.http.routers.sonarr.rule: "Host(`{{ sonarr_hostname }}.{{ ansible_nas_domain }}`)"
|
|
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 }}"
|
|
traefik.http.services.sonarr.loadbalancer.server.port: "8989" |