Deploy branding.xml with a "Sign in with Authentik" button in the login disclaimer. Local password login remains available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
77 lines
2.4 KiB
YAML
77 lines
2.4 KiB
YAML
---
|
|
- name: Install Jellyfin via Homebrew cask
|
|
community.general.homebrew_cask:
|
|
name: jellyfin
|
|
state: present
|
|
|
|
- name: Ensure Jellyfin data directory exists
|
|
ansible.builtin.file:
|
|
path: "{{ jellyfin_data_dir }}"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Deploy Jellyfin LaunchAgent plist
|
|
ansible.builtin.template:
|
|
src: mcquack.jellyfin.plist.j2
|
|
dest: ~/Library/LaunchAgents/mcquack.jellyfin.plist
|
|
mode: '0644'
|
|
notify: Reload jellyfin
|
|
|
|
- name: Check if Jellyfin LaunchAgent is loaded
|
|
ansible.builtin.command: launchctl list mcquack.jellyfin
|
|
register: jellyfin_launchctl_check
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Load Jellyfin LaunchAgent if not loaded
|
|
ansible.builtin.command: launchctl load ~/Library/LaunchAgents/mcquack.jellyfin.plist
|
|
when: jellyfin_launchctl_check.rc != 0
|
|
changed_when: true
|
|
failed_when: false
|
|
|
|
# SSO plugin installation
|
|
- name: Ensure SSO-Auth plugin directory exists
|
|
ansible.builtin.file:
|
|
path: "{{ jellyfin_plugins_dir }}/SSO-Auth_{{ jellyfin_sso_plugin_version }}"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Download SSO-Auth plugin archive
|
|
ansible.builtin.get_url:
|
|
url: "https://github.com/9p4/jellyfin-plugin-sso/releases/download/v{{ jellyfin_sso_plugin_version }}/sso-authentication_{{ jellyfin_sso_plugin_version }}.zip"
|
|
dest: "/tmp/sso-authentication_{{ jellyfin_sso_plugin_version }}.zip"
|
|
mode: '0644'
|
|
|
|
- name: Extract SSO-Auth plugin
|
|
ansible.builtin.unarchive:
|
|
src: "/tmp/sso-authentication_{{ jellyfin_sso_plugin_version }}.zip"
|
|
dest: "{{ jellyfin_plugins_dir }}/SSO-Auth_{{ jellyfin_sso_plugin_version }}"
|
|
remote_src: true
|
|
notify: Reload jellyfin
|
|
|
|
- name: Ensure plugin configurations directory exists
|
|
ansible.builtin.file:
|
|
path: "{{ jellyfin_plugins_dir }}/configurations"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Deploy SSO-Auth plugin configuration
|
|
ansible.builtin.template:
|
|
src: sso-auth.xml.j2
|
|
dest: "{{ jellyfin_plugins_dir }}/configurations/SSO-Auth.xml"
|
|
mode: '0644'
|
|
notify: Reload jellyfin
|
|
|
|
# Branding — add SSO login button to login page
|
|
- name: Ensure Jellyfin config directory exists
|
|
ansible.builtin.file:
|
|
path: "{{ jellyfin_data_dir }}/config"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Deploy Jellyfin branding configuration
|
|
ansible.builtin.template:
|
|
src: branding.xml.j2
|
|
dest: "{{ jellyfin_data_dir }}/config/branding.xml"
|
|
mode: '0644'
|
|
notify: Reload jellyfin
|