2021-02-21 19:50:07 +00:00
|
|
|
---
|
2019-08-27 12:58:00 +00:00
|
|
|
- name: Create Jellyfin Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- "{{ jellyfin_config_directory }}"
|
|
|
|
|
|
|
|
- name: Jellyfin Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: jellyfin
|
|
|
|
image: linuxserver/jellyfin
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ jellyfin_config_directory }}:/config:rw"
|
|
|
|
- "{{ jellyfin_movies_directory }}:/movies:{{ jellyfin_movies_permissions }}"
|
2020-06-21 03:06:58 +00:00
|
|
|
- "{{ jellyfin_music_directory }}:/music:{{ jellyfin_music_permissions }}"
|
|
|
|
- "{{ jellyfin_photos_directory }}:/photos:{{ jellyfin_photos_permissions }}"
|
2019-08-27 12:58:00 +00:00
|
|
|
- "{{ jellyfin_tv_directory }}:/tv:{{ jellyfin_tv_permissions }}"
|
2020-07-16 05:15:04 +00:00
|
|
|
- "{{ jellyfin_books_directory }}:/books:{{ jellyfin_tv_permissions }}"
|
|
|
|
- "{{ jellyfin_audiobooks_directory }}:/audiobooks:{{ jellyfin_tv_permissions }}"
|
2019-08-27 12:58:00 +00:00
|
|
|
ports:
|
2020-01-05 21:47:40 +00:00
|
|
|
- "{{ jellyfin_port_http }}:8096"
|
|
|
|
- "{{ jellyfin_port_https }}:8920"
|
2019-08-27 12:58:00 +00:00
|
|
|
env:
|
|
|
|
TZ: "{{ ansible_nas_timezone }}"
|
|
|
|
PUID: "{{ jellyfin_user_id }}"
|
|
|
|
PGID: "{{ jellyfin_group_id }}"
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: 1g
|
|
|
|
labels:
|
|
|
|
traefik.enable: "{{ jellyfin_available_externally }}"
|
2021-01-19 23:51:59 +00:00
|
|
|
traefik.http.routers.jellyfin.rule: "Host(`jellyfin.{{ ansible_nas_domain }}`)"
|
|
|
|
traefik.http.routers.jellyfin.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.jellyfin.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.jellyfin.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
2021-01-22 16:02:59 +00:00
|
|
|
traefik.http.services.jellyfin.loadbalancer.server.port: "8096"
|