Added code to manage the Jellyfin repository
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine 2023-12-12 13:34:35 -05:00
parent 53c160d56a
commit df7ce1df3c
3 changed files with 24 additions and 0 deletions

View File

@ -2,6 +2,7 @@
# vim: ft=yaml
jellyfin:
manage_repo: True
pkg_name: 'jellyfin'
service_name: 'jellyfin'
service_enabled: True

View File

@ -2,5 +2,6 @@
# vim: ft=sls
include:
- .repo
- .install

22
jellyfin/package/repo.sls Normal file
View File

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import jellyfin with context %}
{%- set os = salt['grains.get']('os') %}
{%- set codename = salt['grains.get']('oscodename') %}
{% if jellyfin.manage_repo %}
jellyfin_repo:
pkgrepo.managed:
- humanname: 'Jellyfin repository'
- name: "deb https://repo.jellyfin.org/{{ os }} {{ codename }} main"
- file: '/etc/apt/sources.list.d/jellyfin.list'
- dist: "{{ codename }}"
- key_url: 'https://repo.jellyfin.org/jellyfin_team.gpg.key'
- gpgcheck: 1
- require_in:
- pkg: jellyfin_pkg_install
{% endif %}