61 lines
1.2 KiB
YAML
61 lines
1.2 KiB
YAML
- name: Add Jellyfin GPG key
|
|
apt_key:
|
|
url: "https://repo.jellyfin.org/debian/jellyfin_team.gpg.key"
|
|
state: present
|
|
|
|
- name: Add Jellyfin repository
|
|
apt_repository:
|
|
repo: "deb https://repo.jellyfin.org/debian bookworm main"
|
|
filename: 'jellyfin'
|
|
state: present
|
|
|
|
- name: Install Jellyfin
|
|
apt:
|
|
name: jellyfin
|
|
state: present
|
|
|
|
- name: Create Jellyfin user
|
|
user:
|
|
name: jellyfin
|
|
groups:
|
|
- data
|
|
append: true
|
|
create_home: no
|
|
shell: /bin/nologin
|
|
update_password: on_create
|
|
|
|
- name: Copy over service file
|
|
copy:
|
|
src: jellyfin.service.conf
|
|
dest: '/etc/systemd/system/jellyfin.service.d/jellyfin.service.conf'
|
|
owner: root
|
|
group: root
|
|
mode: '644'
|
|
notify:
|
|
- daemon-reload
|
|
- restart-jellyfin
|
|
|
|
- name: Copy over Environment file
|
|
copy:
|
|
src: jellyfin-defaults
|
|
dest: '/etc/default/jellyfin'
|
|
owner: root
|
|
group: root
|
|
mode: '644'
|
|
notify: restart-jellyfin
|
|
|
|
- name: Ensure Jellyfin service is running & enabled
|
|
service:
|
|
name: jellyfin
|
|
state: started
|
|
enabled: true
|
|
|
|
- name: Ensure Jellyfin Caddyfile is present
|
|
copy:
|
|
src: 'jellyfin.Caddyfile'
|
|
dest: '/etc/caddy/jellyfin.Caddyfile'
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
notify: caddy-reload
|