homelab/roles/jellyfin/tasks/main.yml

32 lines
772 B
YAML
Raw Normal View History

2024-10-25 20:10:23 +05:00
---
- name: Create jellyfin volumes
become: true
community.docker.docker_volume:
name: "{{ item }}"
loop:
- jellyfin-cache
- jellyfin-config
2024-11-02 00:34:53 +05:00
- name: Copy logging config
become: true
ansible.builtin.template:
src: logging.json.j2
dest: /var/lib/docker/volumes/jellyfin-config/_data/config/logging.json
mode: "0644"
2024-10-25 20:10:23 +05:00
- name: Run jellyfin
become: true
community.docker.docker_container:
name: jellyfin
image: jellyfin/jellyfin:10.9.11
networks:
- name: haproxy
user: "1000:1000"
volumes:
- jellyfin-cache:/cache
- jellyfin-config:/config
- /mnt/hdd/jellyfin:/media
devices:
- /dev/dri/
env:
JELLYFIN_PublishedServerUrl: "{{ server_url }}"
restart_policy: unless-stopped