From f568d8f13c56be78d181ce7df284c14e2e291b72 Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 21 Mar 2021 23:26:08 +0100 Subject: [PATCH] reorder session variables --- README.md | 9 +++++++++ defaults/main.yml | 6 ++++++ templates/gitea.ini.j2 | 17 +++++++---------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ca88133..0c72d8a 100644 --- a/README.md +++ b/README.md @@ -172,6 +172,15 @@ Here is a deeper insight into the variables of this gitea role. For the exact fu | `gitea_mailer_type` | `smtp` | `[smtp, sendmail, dummy]` | | `gitea_mailer_extra_config` | `''` | you can use this variable to pass additional config parameters in the `[mailer]` section of the config. | +### Session ([session](https://docs.gitea.io/en-us/config-cheat-sheet/#session-session)) +| variable name | default value | description | +| ------------- | ------------- | ----------- | +| `gitea_session_provider` | `file` | Session engine provider | +| `gitea_session_extra_config` | `''` | you can use this variable to pass additional config parameters in the `[session]` section of the config. | + + + + | `gitea_enable_notify_mail`: Whether e-mail should be send to watchers of a repository when something happens. Default: `false` diff --git a/defaults/main.yml b/defaults/main.yml index b6ef213..01141e1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -103,6 +103,12 @@ gitea_subject_prefix: '' gitea_mailer_type: smtp gitea_mailer_extra_config: '' +# Session (session) +# -> https://docs.gitea.io/en-us/config-cheat-sheet/#session-session +gitea_session_provider: 'file' +gitea_session_extra_config: '' + +# # look and feel gitea_disable_gravatar: true diff --git a/templates/gitea.ini.j2 b/templates/gitea.ini.j2 index f0911ea..cbc2f68 100644 --- a/templates/gitea.ini.j2 +++ b/templates/gitea.ini.j2 @@ -113,7 +113,7 @@ AUTO_WATCH_NEW_REPOS = {{ gitea_auto_watch_new_repos | ternary('tru [mailer] ENABLED = {{ gitea_mailer_enabled | ternary('true', 'false') }} HOST = {{ gitea_mailer_host }} -SKIP_VERIFY = {{ gitea_mailer_skip_verify }} +SKIP_VERIFY = {{ gitea_mailer_skip_verify | ternary('true', 'false') }} IS_TLS_ENABLED = {{ gitea_mailer_tls_enabled | ternary('true', 'false') }} FROM = {{ gitea_mailer_from }} USER = {{ gitea_mailer_user }} @@ -123,17 +123,14 @@ MAILER_TYPE = {{ gitea_mailer_type }} {{ gitea_mailer_extra_config }} ; ; -; +; -> https://docs.gitea.io/en-us/config-cheat-sheet/#session-session [session] -; Either "memory", "file", or "redis", default is "memory" -PROVIDER = file -; Provider config options -; memory: doesn't have any config yet -; file: session file path, e.g. `data/sessions` -; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180 -; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table` +PROVIDER = {{ gitea_session_provider }} PROVIDER_CONFIG = {{ gitea_home }}/data/sessions - +{{ gitea_session_extra_config }} +; +; +; [picture] AVATAR_UPLOAD_PATH = {{ gitea_home }}/data/avatars ; This value will always be true in offline mode.