From 3343913ddf8bf7789922b75dc5461f1e2f080b0e Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 5 Jan 2025 18:52:23 +0100 Subject: [PATCH] updated gitea state --- states/gitea/config.sls | 4 ++-- states/gitea/install.sls | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/states/gitea/config.sls b/states/gitea/config.sls index 86a2ce3..3ea08ca 100644 --- a/states/gitea/config.sls +++ b/states/gitea/config.sls @@ -7,8 +7,8 @@ gitea-config: - name: {{ gitea.configfile }} - source: salt://gitea/templates/app.ini.j2 - template: jinja - - user: git - - group: git + - user: {{ gitea.user }} + - group: {{ gitea.group }} - mode: 600 - makedirs: true - require: diff --git a/states/gitea/install.sls b/states/gitea/install.sls index f624950..8355a04 100644 --- a/states/gitea/install.sls +++ b/states/gitea/install.sls @@ -20,8 +20,16 @@ gitea-bin: - name: {{ gitea.workingdir }}/gitea - source: "{{ gitea.release_url }}/{{ gitea.version }}/gitea-{{ gitea.version }}-{{ gitea.os }}-{{ gitea.arch }}" - source_hash: "{{ gitea.release_url }}/{{ gitea.version }}/gitea-{{ gitea.version }}-{{ gitea.os }}-{{ gitea.arch }}.sha256" - - user: git - - group: git + - user: {{ gitea.user }} + - group: {{ gitea.group }} - mode: 750 - require: - git + +gitea-log-dir: + file.managed: + - name: {{ gitea.config.log.rootpath }} + - user: {{ gitea.user }} + - group: {{ gitea.group }} + - require: + - file: gitea-bin