Skip to content

Commit 6f07f2c

Browse files
committed
Repository Upload
Adding variables to configure repository upload more easily
1 parent 2efc177 commit 6f07f2c

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

README.md

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

99105
### Repository - Signing ([repository.signing](https://docs.gitea.io/en-us/config-cheat-sheet/#repository---signing-repositorysigning))

defaults/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ gitea_force_private: false
4545
gitea_user_repo_limit: '-1'
4646
gitea_repository_root: "{{ gitea_home }}/repos"
4747
gitea_repository_extra_config: ''
48+
49+
# Repository - Upload (repository.upload)
50+
# -> https://docs.gitea.io/en-us/administration/config-cheat-sheet/#repository---upload-repositoryupload
51+
gitea_repository_upload_enabled: true
52+
gitea_repository_upload_max_size: 4
4853
gitea_repository_upload_extra_config: ''
4954

5055
# Repository - Signing (repository.signing)

templates/gitea.ini.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ DEFAULT_BRANCH = {{ gitea_default_branch }}
2727
{{ gitea_repository_extra_config }}
2828
;
2929
;
30+
; -> https://docs.gitea.io/en-us/administration/config-cheat-sheet/#repository---upload-repositoryupload
3031
[repository.upload]
32+
ENABLED = {{ gitea_repository_upload_enabled | ternary('true', 'false') }}
3133
TEMP_PATH = {{ gitea_home }}/data/tmp/uploads
34+
FILE_MAX_SIZE = {{ gitea_repository_upload_max_size }}
3235
{{ gitea_repository_upload_extra_config }}
3336
;
3437
;

vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ transfer_custom_footer:
6262
- 'files/gitea_footer/extra_links_footer.tmpl'
6363
- 'files/extra_links_footer.tmpl'
6464

65-
playbook_version_number: 46 # should be int
65+
playbook_version_number: 47 # should be int
6666
playbook_version_path: 'do1jlr.gitea.version'

0 commit comments

Comments
 (0)