chore: Update template
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
Has a dependency on `gitea.config.clean`_.
|
||||
#}
|
||||
|
||||
{%- set tplroot = tpldir.split('/')[0] %}
|
||||
{%- set sls_config_clean = tplroot ~ '.config.clean' %}
|
||||
{%- set tplroot = tpldir.split("/")[0] %}
|
||||
{%- set sls_config_clean = tplroot ~ ".config.clean" %}
|
||||
{%- from tplroot ~ "/map.jinja" import mapdata as gitea with context %}
|
||||
|
||||
include:
|
||||
@@ -17,8 +17,8 @@ Gitea package files are absent:
|
||||
file.absent:
|
||||
- names:
|
||||
- {{ gitea.lookup.service.unit.format(name=gitea.lookup.service.name) }}
|
||||
- {{ gitea.lookup.paths.bin | path_join('gitea') }}
|
||||
{%- for p in ['conf', 'custom', 'log'] %}
|
||||
- {{ gitea.lookup.paths.bin | path_join("gitea") }}
|
||||
{%- for p in ["conf", "custom", "log"] %}
|
||||
- {{ gitea.lookup.paths[p] }}
|
||||
{%- endfor %}
|
||||
# to make sure this can be installed again (onchanges req in package.installed)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=sls
|
||||
|
||||
{%- set tplroot = tpldir.split('/')[0] %}
|
||||
{%- set tplroot = tpldir.split("/")[0] %}
|
||||
{%- from tplroot ~ "/map.jinja" import mapdata as gitea with context %}
|
||||
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
|
||||
|
||||
@@ -112,7 +111,7 @@ Gitea binary is absent if verification failed:
|
||||
Gitea directories are setup:
|
||||
file.directory:
|
||||
- names:
|
||||
{%- for p in ['conf', 'work', 'custom', 'data', 'log', 'repos'] %}
|
||||
{%- for p in ["conf", "work", "custom", "data", "log", "repos"] %}
|
||||
- {{ gitea.lookup.paths[p] }}
|
||||
{%- endfor %}
|
||||
- makedirs: true
|
||||
@@ -123,7 +122,7 @@ Gitea directories are setup:
|
||||
|
||||
Gitea binary is installed:
|
||||
file.copy:
|
||||
- name: {{ gitea.lookup.paths.bin | path_join('gitea') }}
|
||||
- name: {{ gitea.lookup.paths.bin | path_join("gitea") }}
|
||||
- source: /tmp/gitea-{{ gitea.version }}
|
||||
# in case the version changed, overwrite previous binary
|
||||
- force: true
|
||||
@@ -141,15 +140,15 @@ Gitea service unit is available:
|
||||
file.managed:
|
||||
- name: {{ gitea.lookup.service.unit.format(name=gitea.lookup.service.name) }}
|
||||
- source: {{ files_switch(
|
||||
['gitea.service.j2'],
|
||||
lookup='Gitea service unit is available',
|
||||
["gitea.service.j2"],
|
||||
lookup="Gitea service unit is available",
|
||||
) }}
|
||||
- template: jinja
|
||||
- mode: '0644'
|
||||
- user: root
|
||||
- group: {{ gitea.lookup.rootgroup }}
|
||||
- makedirs: true
|
||||
- context: {{ {'gitea': gitea} | json }}
|
||||
- context: {{ {"gitea": gitea} | json }}
|
||||
- require:
|
||||
- Gitea binary is installed
|
||||
{%- if 'systemctl' | which %}
|
||||
|
||||
Reference in New Issue
Block a user