Added basic package install and service running checks
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
dc230e5449
commit
53c160d56a
8
jellyfin/defaults.yaml
Normal file
8
jellyfin/defaults.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
|
||||||
|
jellyfin:
|
||||||
|
pkg_name: 'jellyfin'
|
||||||
|
service_name: 'jellyfin'
|
||||||
|
service_enabled: True
|
||||||
|
|
4
jellyfin/init.sls
Normal file
4
jellyfin/init.sls
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
include:
|
||||||
|
- .package
|
||||||
|
- .service
|
||||||
|
|
28
jellyfin/map.jinja
Normal file
28
jellyfin/map.jinja
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=jinja
|
||||||
|
|
||||||
|
{%- set tplroot = tpldir.split('/')[0] %}
|
||||||
|
{%- import_yaml tplroot ~ "/defaults.yaml" as default_settings %}
|
||||||
|
|
||||||
|
{#- Retrieve the config dict only once #}
|
||||||
|
{%- set _config = salt['config.get'](tplroot, default={}) %}
|
||||||
|
|
||||||
|
{%- set defaults = salt['grains.filter_by'](
|
||||||
|
default_settings,
|
||||||
|
default=tplroot,
|
||||||
|
merge=salt['grains.filter_by'](
|
||||||
|
_config,
|
||||||
|
default='lookup'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
%}
|
||||||
|
|
||||||
|
{%- set config = salt['grains.filter_by'](
|
||||||
|
{'defaults': defaults},
|
||||||
|
default='defaults',
|
||||||
|
merge=_config
|
||||||
|
)
|
||||||
|
%}
|
||||||
|
|
||||||
|
{%- set jellyfin = config %}
|
||||||
|
|
6
jellyfin/package/init.sls
Normal file
6
jellyfin/package/init.sls
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=sls
|
||||||
|
|
||||||
|
include:
|
||||||
|
- .install
|
||||||
|
|
9
jellyfin/package/install.sls
Normal file
9
jellyfin/package/install.sls
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=sls
|
||||||
|
|
||||||
|
{%- set tplroot = tpldir.split('/')[0] %}
|
||||||
|
{%- from tplroot ~ "/map.jinja" import jellyfin with context %}
|
||||||
|
jellyfin_pkg_install:
|
||||||
|
pkg.installed:
|
||||||
|
- name: {{ jellyfin.pkg_name }}
|
||||||
|
|
6
jellyfin/service/init.sls
Normal file
6
jellyfin/service/init.sls
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=sls
|
||||||
|
|
||||||
|
include:
|
||||||
|
- .running
|
||||||
|
|
15
jellyfin/service/running.sls
Normal file
15
jellyfin/service/running.sls
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=sls
|
||||||
|
|
||||||
|
{%- set tplroot = tpldir.split('/')[0] %}
|
||||||
|
{%- set sls_config_file = tplroot ~ '.config.file' %}
|
||||||
|
{%- from tplroot ~ "/map.jinja" import jellyfin with context %}
|
||||||
|
|
||||||
|
include:
|
||||||
|
- {{ sls_config_file }}
|
||||||
|
|
||||||
|
jellyfin_service:
|
||||||
|
service.running:
|
||||||
|
- name: {{ jellyfin.service_name }}
|
||||||
|
- enable: {{ jellyfin.service_enabled }}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user