diff --git a/tasks/main.yaml b/tasks/main.yaml index 0f00d22..cbabafe 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -35,6 +35,14 @@ group: "{{ git_user.group }}" mode: 0755 +- name: Create Logging Directory + file: + path: "/opt/gitea/log" + state: directory + owner: "{{ git_user.uid }}" + group: "{{ git_user.group }}" + mode: 0755 + - name: Start Docker Daemon systemd: name: docker diff --git a/templates/environment.env.j2 b/templates/environment.env.j2 index 04d4885..d272ef0 100644 --- a/templates/environment.env.j2 +++ b/templates/environment.env.j2 @@ -121,6 +121,27 @@ GITEA__attachment__MINIO_USE_SSL={{ gitea_vars.attachment.minio_use_ssl }} {% endif %} {% endif %} {# /attachment #} +{% if 'log' in gitea_vars %} +{% if 'root_path' in gitea_vars['log'] %} +GITEA__ssh__ROOT_PATH={{ gitea_vars.log.root_path }} +{% endif %} +{% if 'mode' in gitea_vars['log'] %} +GITEA__ssh__MODE={{ gitea_vars.log.mode }} +{% endif %} +{% if 'level' in gitea_vars['log'] %} +GITEA__ssh__LEVEL={{ gitea_vars.log.level }} +{% endif %} +{% if 'stacktrace_level' in gitea_vars['log'] %} +GITEA__ssh__STACKTRACE_LEVEL={{ gitea_vars.log.stacktrace_level }} +{% endif %} +{% if 'enable_ssh_log' in gitea_vars['log'] %} +GITEA__ssh__ENABLE_SSH_LOG={{ gitea_vars.log.enable_ssh_log }} +{% endif %} +{% if 'enable_xorm_log' in gitea_vars['log'] %} +GITEA__ssh__ENABLE_XORM_LOG={{ gitea_vars.log.enable_xorm_log }} +{% endif %} +{% endif %} {# /logging#} + {% if 'ssh' in gitea_vars %} {% if 'minimum_key_sizes' in gitea_vars['ssh'] %} {% if 'ed25519' in gitea_vars['ssh']['minimum_key_sizes'] %}