homelab/roles/jellyfin/tasks/main.yml

61 lines
1.2 KiB
YAML
Raw Normal View History

2022-12-02 21:23:33 +01:00
- 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:
2023-12-24 20:52:13 +01:00
repo: "deb https://repo.jellyfin.org/debian bookworm main"
2022-12-02 21:23:33 +01:00
filename: 'jellyfin'
state: present
- name: Install Jellyfin
apt:
name: jellyfin
state: present
2022-12-03 09:07:47 +01:00
2023-12-24 20:52:13 +01:00
- name: Create Jellyfin user
user:
name: jellyfin
groups:
- data
append: true
create_home: no
shell: /bin/nologin
update_password: on_create
2022-12-03 10:11:05 +01:00
- 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
2022-12-03 09:07:47 +01:00
- 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
2023-12-30 11:25:58 +01:00
- name: Ensure Jellyfin Caddyfile is present
copy:
src: 'jellyfin.Caddyfile'
dest: '/etc/caddy/jellyfin.Caddyfile'
owner: root
group: root
mode: '0644'
notify: caddy-reload