homelab/roles/jellyfin/tasks/main.yml

37 lines
852 B
YAML
Raw Permalink Normal View History

2021-04-26 20:35:59 +00:00
- name: ensure directories exist
file:
path: "{{ item }}"
state: directory
mode: '0755'
loop:
- "{{ data_folder }}/jellyfin"
- "{{ media.tv }}"
- "{{ media.movies }}"
- name: run container
docker_container:
name: 'jellyfin'
image: linuxserver/jellyfin
networks:
- name: external
volumes:
- "{{ data_folder }}/jellyfin:/config"
2021-04-26 20:35:59 +00:00
- "{{ media.tv }}:/data/tv"
- "{{ media.movies }}:/data/movies"
ports:
- "8096:8096"
- "8920:8920"
- "7359:7359/udp"
- "1900:1900/udp"
env:
PUID={{ puid }}
PGID={{ pgid }}
TZ={{ tz }}
devices:
- /dev/dri:/dev/dri
state: started
- name: copy jellyfin nginx config
template:
src: jellyfin.conf.j2
2021-04-26 16:54:27 +00:00
dest: "{{ nginx_confd_folder }}/jellyfin.conf"
mode: '0755'
notify: reload nginx