From cde4a964d584670201d2d5aa479da33dcf648eb0 Mon Sep 17 00:00:00 2001 From: L3D Date: Thu, 14 Jan 2021 11:51:58 +0100 Subject: [PATCH] add LFS_JWT_SECRET option + Add comments about git-lfs to the README. + New variable for LFS_JWT_SECRET. + absolute path for gitea_lfs_content_path. + maybe some help to resolve https://github.com/thomas-maurice/ansible-role-gitea/issues/70 --- README.md | 7 +++++++ defaults/main.yml | 3 ++- templates/gitea.ini.j2 | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 909d1b6..d451b02 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,13 @@ The following code has been tested with Debian 8, it should work on Ubuntu as we * `gitea_mailer_from`: Sender mail address * `gitea_enable_notify_mail`: Whether e-mail should be send to watchers of a repository when something happens. Default: `false` +### LFS configuration + +* `gitea_lfs_enabled`: Enable GIT LFS *(git large file storeage: [git-lfs](https://git-lfs.github.com/))*. Default: `false` +* `gitea_lfs_content_path`: path where the lfs files are stored +* `gitea_lfs_secret`: JWT secret for remote LFS usage + + ### Fail2Ban configuration If enabled, this will deploy a fail2ban filter and jail config for Gitea as described in the [Gitea Documentation](https://docs.gitea.io/en-us/fail2ban-setup/). diff --git a/defaults/main.yml b/defaults/main.yml index 7b4abfe..ad40a61 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -21,7 +21,8 @@ gitea_disable_http_git: false gitea_offline_mode: true gitea_lfs_server_enabled: false -gitea_lfs_content_path: "data/lfs" +gitea_lfs_content_path: "{{ gitea_home }}/data/lfs" +gitea_lfs_jwt_secret: LongUniqueS3cret_ gitea_db_type: sqlite3 gitea_db_host: 127.0.0.0:3306 diff --git a/templates/gitea.ini.j2 b/templates/gitea.ini.j2 index 2e40307..4fbdc0e 100644 --- a/templates/gitea.ini.j2 +++ b/templates/gitea.ini.j2 @@ -58,6 +58,9 @@ APP_DATA_PATH = {{ gitea_home }}/data LFS_START_SERVER = true ; Where to store LFS files. LFS_CONTENT_PATH = {{ gitea_lfs_content_path }} +; LFS authentication secret +LFS_JWT_SECRET = {{ gitea_lfs_jwt_secret }} + {%- endif %} [database]