88 lines
1.8 KiB
YAML
88 lines
1.8 KiB
YAML
|
---
|
||
|
- name: install dependency packages
|
||
|
apt:
|
||
|
name:
|
||
|
- imagemagick
|
||
|
- mono-runtime
|
||
|
- mediainfo
|
||
|
- libsqlite3-dev
|
||
|
- mesa-va-drivers
|
||
|
- firmware-amd-graphics
|
||
|
- firmware-linux-nonfree
|
||
|
- xserver-xorg-video-amdgpu
|
||
|
- libdrm-amdgpu1
|
||
|
- vainfo
|
||
|
- libva-dev
|
||
|
- pciutils
|
||
|
- radeontop
|
||
|
state: latest
|
||
|
|
||
|
- name: install Jellyfin repository
|
||
|
template:
|
||
|
src: "jellyfin.list.j2"
|
||
|
dest: "/etc/apt/sources.list.d/jellyfin.list"
|
||
|
register: initial_install
|
||
|
|
||
|
- name: add key for Jellyfin repository
|
||
|
apt_key:
|
||
|
url: "https://repo.jellyfin.org/debian/jellyfin_team.gpg.key"
|
||
|
id: "1DE21A7B"
|
||
|
state: present
|
||
|
|
||
|
- name: update apt cache
|
||
|
apt:
|
||
|
update_cache: yes
|
||
|
|
||
|
- name: install Jellyfin application packages
|
||
|
apt:
|
||
|
name:
|
||
|
- jellyfin
|
||
|
- jellyfin-ffmpeg
|
||
|
state: latest
|
||
|
|
||
|
- name: add Jellyfin user to the video group
|
||
|
user:
|
||
|
name: "jellyfin"
|
||
|
groups: "video"
|
||
|
append: yes
|
||
|
|
||
|
- name: stop Jellyfin daemon (initial install only)
|
||
|
service:
|
||
|
name: "jellyfin"
|
||
|
state: stopped
|
||
|
when: initial_install.changed
|
||
|
|
||
|
- name: move Jellyfin data directory to /srv (initial install only)
|
||
|
command: mv /var/lib/jellyfin /srv/jellyfin
|
||
|
args:
|
||
|
creates: /srv/jellyfin
|
||
|
when: initial_install.changed
|
||
|
|
||
|
- name: add symlink to Jellyfin data directory (initial install only)
|
||
|
file:
|
||
|
dest: "/var/lib/jellyfin"
|
||
|
src: "/srv/jellyfin"
|
||
|
state: link
|
||
|
force: yes
|
||
|
when: initial_install.changed
|
||
|
|
||
|
- name: install custom Jellyfin server configs
|
||
|
copy:
|
||
|
src: "{{ item }}"
|
||
|
dest: "/etc/jellyfin/{{ item }}"
|
||
|
owner: "jellyfin"
|
||
|
group: "jellyfin"
|
||
|
mode: "0640"
|
||
|
notify: restart jellyfin
|
||
|
with_items:
|
||
|
- logging.json
|
||
|
|
||
|
- name: start and enable services
|
||
|
service:
|
||
|
name: "{{ item }}"
|
||
|
state: started
|
||
|
enabled: yes
|
||
|
with_items:
|
||
|
- jellyfin
|
||
|
|