1
1
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_gitea.git synced 2024-08-16 11:39:50 +02:00

Repository Upload

Adding variables to configure repository upload more easily
This commit is contained in:
L3D 2023-05-12 20:19:43 +02:00
parent 2efc177642
commit 6f07f2c5c6
Signed by: l3d
GPG key ID: CD08445BFF4313D1
4 changed files with 15 additions and 1 deletions

View file

@ -94,6 +94,12 @@ Either you define exactly which release you install. Or you use the option ``lat
| `gitea_user_repo_limit` | `-1` | Limit how many repos a user can have *(`-1` for unlimited)* | | `gitea_user_repo_limit` | `-1` | Limit how many repos a user can have *(`-1` for unlimited)* |
| `gitea_repository_root` | `{{ gitea_home }}/repos` | Root path for storing all repository data. It must be an absolute path. | | `gitea_repository_root` | `{{ gitea_home }}/repos` | Root path for storing all repository data. It must be an absolute path. |
| `gitea_repository_extra_config` | | you can use this variable to pass additional config parameters in the `[repository]` section of the config. | | `gitea_repository_extra_config` | | you can use this variable to pass additional config parameters in the `[repository]` section of the config. |
### Repository - Upload ([repository.upload](https://docs.gitea.io/en-us/administration/config-cheat-sheet/#repository---upload-repositoryupload))
| variable name | default value | description |
| ------------- | ------------- | ----------- |
| `gitea_repository_upload_enabled` | `true` | Whether repository file uploads are enabled |
| `gitea_repository_upload_max_size` | `4` | Max size of each file in megabytes. |
| `gitea_repository_upload_extra_config` | | you can use this variable to pass additional config parameters in the `[repository.upload]` section of the config. | | `gitea_repository_upload_extra_config` | | you can use this variable to pass additional config parameters in the `[repository.upload]` section of the config. |
### Repository - Signing ([repository.signing](https://docs.gitea.io/en-us/config-cheat-sheet/#repository---signing-repositorysigning)) ### Repository - Signing ([repository.signing](https://docs.gitea.io/en-us/config-cheat-sheet/#repository---signing-repositorysigning))

View file

@ -45,6 +45,11 @@ gitea_force_private: false
gitea_user_repo_limit: '-1' gitea_user_repo_limit: '-1'
gitea_repository_root: "{{ gitea_home }}/repos" gitea_repository_root: "{{ gitea_home }}/repos"
gitea_repository_extra_config: '' gitea_repository_extra_config: ''
# Repository - Upload (repository.upload)
# -> https://docs.gitea.io/en-us/administration/config-cheat-sheet/#repository---upload-repositoryupload
gitea_repository_upload_enabled: true
gitea_repository_upload_max_size: 4
gitea_repository_upload_extra_config: '' gitea_repository_upload_extra_config: ''
# Repository - Signing (repository.signing) # Repository - Signing (repository.signing)

View file

@ -27,8 +27,11 @@ DEFAULT_BRANCH = {{ gitea_default_branch }}
{{ gitea_repository_extra_config }} {{ gitea_repository_extra_config }}
; ;
; ;
; -> https://docs.gitea.io/en-us/administration/config-cheat-sheet/#repository---upload-repositoryupload
[repository.upload] [repository.upload]
ENABLED = {{ gitea_repository_upload_enabled | ternary('true', 'false') }}
TEMP_PATH = {{ gitea_home }}/data/tmp/uploads TEMP_PATH = {{ gitea_home }}/data/tmp/uploads
FILE_MAX_SIZE = {{ gitea_repository_upload_max_size }}
{{ gitea_repository_upload_extra_config }} {{ gitea_repository_upload_extra_config }}
; ;
; ;

View file

@ -62,5 +62,5 @@ transfer_custom_footer:
- 'files/gitea_footer/extra_links_footer.tmpl' - 'files/gitea_footer/extra_links_footer.tmpl'
- 'files/extra_links_footer.tmpl' - 'files/extra_links_footer.tmpl'
playbook_version_number: 46 # should be int playbook_version_number: 47 # should be int
playbook_version_path: 'do1jlr.gitea.version' playbook_version_path: 'do1jlr.gitea.version'