diff --git a/gitea/mods/rst/clean.sls b/gitea/mods/rst/clean.sls index b0b8789..5bab972 100644 --- a/gitea/mods/rst/clean.sls +++ b/gitea/mods/rst/clean.sls @@ -8,7 +8,6 @@ {%- set tplroot = tpldir.split("/")[0] %} {%- set sls_config_file = tplroot ~ ".config.file" %} {%- from tplroot ~ "/map.jinja" import mapdata as gitea with context %} -{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %} Gitea RST external renderer is absent: file.absent: diff --git a/gitea/mods/rst/init.sls b/gitea/mods/rst/init.sls index 76d82b6..6bbb5c7 100644 --- a/gitea/mods/rst/init.sls +++ b/gitea/mods/rst/init.sls @@ -12,7 +12,7 @@ {%- set sls_config_file = tplroot ~ ".config.file" %} {%- set sls_go_install = tplroot ~ ".go" %} {%- from tplroot ~ "/map.jinja" import mapdata as gitea with context %} -{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %} +{%- from tplroot ~ "/libtofsstack.jinja" import files_switch with context %} include: - {{ sls_go_install }} @@ -59,9 +59,11 @@ Chroma is installed: RST external renderer is installed: file.managed: - name: {{ gitea.lookup.mod_rst.path }} - - source: {{ files_switch(["grst"], - use_subpath=True, - lookup="RST external renderer is installed" + - source: {{ files_switch( + ["grst"], + config=gitea, + use_subpath=True, + lookup="RST external renderer is installed", ) }} - mode: '0755' diff --git a/gitea/package/install.sls b/gitea/package/install.sls index d4d65e3..fe5da9b 100644 --- a/gitea/package/install.sls +++ b/gitea/package/install.sls @@ -2,7 +2,7 @@ {%- set tplroot = tpldir.split("/")[0] %} {%- from tplroot ~ "/map.jinja" import mapdata as gitea with context %} -{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %} +{%- from tplroot ~ "/libtofsstack.jinja" import files_switch with context %} Gitea user/group is present: user.present: @@ -140,9 +140,11 @@ Gitea service unit is available: file.managed: - name: {{ gitea.lookup.service.unit.format(name=gitea.lookup.service.name) }} - source: {{ files_switch( - ["gitea.service.j2"], + ["gitea.service", "gitea.service.j2"], + config=gitea, lookup="Gitea service unit is available", - ) }} + ) + }} - template: jinja - mode: '0644' - user: root