Added a basic setup with package install, config, and service management

This commit is contained in:
2023-03-21 12:56:17 -04:00
parent ab178945d1
commit fe72021f00
12 changed files with 139 additions and 2 deletions

5
gitea/service/init.sls Normal file
View File

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
include:
- .running

16
gitea/service/running.sls Normal file
View File

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
{%- set tplroot = tpldir.split('/')[0] %}
{%- set sls_config_file = tplroot ~ '.config.file' %}
{%- from tplroot ~ "/map.jinja" import gitea with context %}
include:
- {{ sls_config_file }}
gitea_service:
service.running:
- name: {{ gitea.service_name }}
- enable: {{ gitea.service_enabled }}
- watch:
- sls: {{ sls_config_file }}