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

update config

Update config, add ui.meta and cors options and update ui vars
This commit is contained in:
L3D 2023-01-25 23:55:35 +01:00
parent 2f6f3496a7
commit fe1a26cd9e
Signed by: l3d
GPG key ID: CD08445BFF4313D1
3 changed files with 74 additions and 12 deletions

View file

@ -96,14 +96,35 @@ Either you define exactly which release you install. Or you use the option ``lat
| `gitea_repo_merges` | *(see defaults)* | Sign merges. |
| `gitea_enable_repo_signing_extra` | | you can use this variable to pass additional config parameters in the `[repository.signing]` section of the config. |
### CORS ([cors](https://docs.gitea.io/en-us/config-cheat-sheet/#cors-cors))
| ------------- | ------------- | ----------- |
| `gitea_enable_cors` | `false` | enable cors headers (disabled by default) |
| `gitea_cors_scheme` | `http` | scheme of allowed requests |
| `gitea_cors_allow_domain` | `*` | list of requesting domains that are allowed |
| `gitea_cors_allow_subdomain` | `false` |allow subdomains of headers listed above to request |
| `gitea_cors_methods` | *(see defaults)* | list of methods allowed to request |
| `gitea_cors_max_age` | `10m` | max time to cache response |
| `gitea_cors_allow_credentials` | `false` | allow request with credentials |
| `gitea_cors_headers` | `Content-Type,User-Agent` | additional headers that are permitted in requests |
| `gitea_cors_x_frame_options` | `SAMEORIGIN` | Set the `X-Frame-Options` header value. |
| `gitea_cors_extra` | | you can use this variable to pass additional config parameters in the `[cors]` section of the config. |
### UI ([ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui))
| variable name | default value | description |
| ------------- | ------------- | ----------- |
| `gitea_show_user_email` | `false` | Do you want to display email addresses ? (true/false) |
| `gitea_theme_default` | `gitea` | Default theme |
| `gitea_themes` | `gitea,arc-green` | List of enabled themes |
| `gitea_theme_default` | `auto` | Default theme |
| `gitea_themes` | `auto,gitea,arc-green` | List of enabled themes |
| `gitea_ui_extra_config` | `''` | you can use this variable to pass additional config parameters in the `[ui]` section of the config. |
### UI - Meta ([ui.meta](https://docs.gitea.io/en-us/config-cheat-sheet/#ui---metadata-uimeta))
| variable name | default value | description |
| ------------- | ------------- | ----------- |
| `gitea_ui_author` | *(see defaults)* | Author meta tag of the homepage. |
| `gitea_ui_description` | *(see defaults)* | Description meta tag of the homepage. |
| `gitea_ui_keywords` | *(see defaults)* | Keywords meta tag of the homepage |
| `gitea_ui_meta_extra_config` | | you can use this variable to pass additional config parameters in the `[ui.meta]` section of the config. |
### Server ([server](https://docs.gitea.io/en-us/config-cheat-sheet/#server-server))
| variable name | default value | description |
| ------------- | ------------- | ----------- |

View file

@ -55,13 +55,33 @@ gitea_repo_crud_actions: 'pubkey, twofa, parentsigned'
gitea_repo_merges: ' pubkey, twofa, basesigned, commitssigned'
gitea_enable_repo_signing_extra: ''
# CORS (cors)
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#cors-cors
gitea_enable_cors: false
gitea_cors_scheme: 'http'
gitea_cors_allow_domain: '*'
gitea_cors_allow_subdomain: false
gitea_cors_methods: 'GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS'
gitea_cors_max_age: '10m'
gitea_cors_allow_credentials: false
gitea_cors_headers: 'Content-Type,User-Agent'
gitea_cors_x_frame_options: 'SAMEORIGIN'
gitea_cors_extra: ''
# UI (ui)
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui
gitea_show_user_email: false
gitea_theme_default: 'gitea'
gitea_themes: 'gitea,arc-green'
gitea_theme_default: 'auto'
gitea_themes: 'auto,gitea,arc-green'
gitea_ui_extra_config: ''
# UI - Metadata (ui.meta)
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#ui---metadata-uimeta
gitea_ui_author: 'Gitea - Git with a cup of tea'
gitea_ui_description: 'Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go:'
gitea_ui_keywords: 'go,git,self-hosted,gitea,forgejo'
gitea_ui_meta_extra_config: ''
# Server (server)
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#server-server
gitea_protocol: 'http'

View file

@ -33,24 +33,45 @@ TEMP_PATH = {{ gitea_home }}/data/tmp/uploads
;{% if gitea_enable_repo_signing_options | bool %}
; -> https://docs.gitea.io/en-us/config-cheat-sheet/#repository---signing-repositorysigning
[repository.signing]
SIGNING_KEY = {{ gitea_repo_signing_key }}
SIGNING_NAME = {{ gitea_repo_signing_name }}
SIGNING_EMAIL = {{ gitea_repo_signing_email }}
INITIAL_COMMIT = {{ gitea_repo_initial_commit }}
SIGNING_KEY = {{ gitea_repo_signing_key }}
SIGNING_NAME = {{ gitea_repo_signing_name }}
SIGNING_EMAIL = {{ gitea_repo_signing_email }}
INITIAL_COMMIT = {{ gitea_repo_initial_commit }}
DEFAULT_TRUST_MODEL = {{ gitea_repo_default_trust_model }}
WIKI = {{ gitea_repo_wiki }}
CRUD_ACTIONS = {{ gitea_repo_crud_actions }}
MERGES = {{ gitea_repo_merges }}
WIKI = {{ gitea_repo_wiki }}
CRUD_ACTIONS = {{ gitea_repo_crud_actions }}
MERGES = {{ gitea_repo_merges }}
{% if gitea_enable_repo_signing_extra != '' %}{{ gitea_enable_repo_signing_extra }}{% else %};{% endif %}
;{% endif %}
;
;{% if gitea_enable_cors | bool %}
; -> https://docs.gitea.io/en-us/config-cheat-sheet/#cors-cors
[cors]
ENABLED = {{ gitea_enable_cors | ternary('true', 'false') }}
SCHEME = {{ gitea_cors_scheme }}
ALLOW_DOMAIN = {{ gitea_cors_allow_domain }}
ALLOW_SUBDOMAIN = {{ gitea_cors_allow_subdomain | ternary('true', 'false') }}
METHODS = {{ gitea_cors_methods }}
MAX_AGE = {{ gitea_cors_max_age }}
ALLOW_CREDENTIALS = {{ gitea_cors_allow_credentials | ternary('true', 'false') }}
HEADERS = {{ gitea_cors_headers }}
X_FRAME_OPTIONS = {{ gitea_cors_x_frame_options }}
{% if gitea_cors_extra != '' %}{{ gitea_cors_extra }}{% else %};{% endif %}
;{% endif %}
;
; -> https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui
[ui]
SHOW_USER_EMAIL = {{ gitea_show_user_email | ternary('true', 'false') }}
DEFAULT_THEME = {{ gitea_theme_default }}
THEMES = {{ gitea_themes }}
{{ gitea_ui_extra_config }}
{% if gitea_ui_extra_config != '' %}{{ gitea_ui_extra_config }}{% else %};{% endif %}
;
;
[ui.meta]
AUTHOR = {{ gitea_ui_author }}
DESCRIPTION = {{ gitea_ui_description }}
KEYWORDS = {{ gitea_ui_keywords }}
{% if gitea_ui_meta_extra_config != '' %}{{ gitea_ui_meta_extra_config }}{% else %};{% endif %}
;
;
; -> https://docs.gitea.io/en-us/config-cheat-sheet/#server-server