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

Cleanup template (#85)

improve template and create loglevel variable
This commit is contained in:
L3D 2021-03-02 10:35:13 +01:00 committed by GitHub
parent 183e58f0e5
commit 2fa3f51eb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 25 deletions

View file

@ -85,4 +85,6 @@ gitea_repo_indexer_exclude: ""
gitea_repo_exclude_vendored: true gitea_repo_exclude_vendored: true
gitea_repo_indexer_max_file_size: 1048576 gitea_repo_indexer_max_file_size: 1048576
gitea_log_level: Info
gitea_extra_config: "" gitea_extra_config: ""

View file

@ -1,10 +1,10 @@
; this file is the configuration of your local gitea instance ; this file is the configuration of your local gitea instance
; {{ ansible_managed }} ; {{ ansible_managed }}
; ;
; This file overwrites the default values from gitea. ; This file overwrites the default values from gitea.
; undefined variables will use the default value from gitea. ; undefined variables will use the default value from gitea.
; Cheat Sheet: https://docs.gitea.io/en-us/config-cheat-sheet/ ; Cheat Sheet: https://docs.gitea.io/en-us/config-cheat-sheet/
; ;
; App name that shows on every page title ; App name that shows on every page title
APP_NAME = {{ gitea_app_name }} APP_NAME = {{ gitea_app_name }}
; Change it if you run locally ; Change it if you run locally
@ -15,17 +15,17 @@ RUN_MODE = prod
[repository] [repository]
ROOT = {{ gitea_repository_root }} ROOT = {{ gitea_repository_root }}
; Force every new repository to be private ; Force every new repository to be private
FORCE_PRIVATE = {{ gitea_force_private }} FORCE_PRIVATE = {{ gitea_force_private | ternary('true', 'false') }}
; Global limit of repositories per user, applied at creation time. -1 means no limit ; Global limit of repositories per user, applied at creation time. -1 means no limit
MAX_CREATION_LIMIT = {{ gitea_user_repo_limit }} MAX_CREATION_LIMIT = {{ gitea_user_repo_limit }}
; Mirror sync queue length, increase if mirror syncing starts hanging ; Mirror sync queue length, increase if mirror syncing starts hanging
MIRROR_QUEUE_LENGTH = 1000 MIRROR_QUEUE_LENGTH = 1000
; Disable the ability to interact with repositories using the HTTP protocol ; Disable the ability to interact with repositories using the HTTP protocol
DISABLE_HTTP_GIT = {{ gitea_disable_http_git }} DISABLE_HTTP_GIT = {{ gitea_disable_http_git | ternary('true', 'false') }}
[ui] [ui]
; Whether the email of the user should be shown in the Explore Users page ; Whether the email of the user should be shown in the Explore Users page
SHOW_USER_EMAIL = {{ gitea_show_user_email }} SHOW_USER_EMAIL = {{ gitea_show_user_email | ternary('true', 'false') }}
THEMES = {{ gitea_themes }} THEMES = {{ gitea_themes }}
DEFAULT_THEME = {{ gitea_theme_default }} DEFAULT_THEME = {{ gitea_theme_default }}
@ -40,7 +40,7 @@ HTTP_PORT = {{ gitea_http_port }}
; Disable SSH feature when not available ; Disable SSH feature when not available
DISABLE_SSH = false DISABLE_SSH = false
; Whether to use the builtin SSH server or not. ; Whether to use the builtin SSH server or not.
START_SSH_SERVER = {{ gitea_start_ssh }} START_SSH_SERVER = {{ gitea_start_ssh | ternary('true', 'false') }}
; Domain name to be exposed in clone URL ; Domain name to be exposed in clone URL
SSH_DOMAIN = {{ gitea_ssh_domain }} SSH_DOMAIN = {{ gitea_ssh_domain }}
; The network interface the builtin SSH server should listen on ; The network interface the builtin SSH server should listen on
@ -50,7 +50,7 @@ SSH_PORT = {{ gitea_ssh_port }}
; The port number the builtin SSH server should listen on ; The port number the builtin SSH server should listen on
SSH_LISTEN_PORT = %(SSH_PORT)s SSH_LISTEN_PORT = %(SSH_PORT)s
; Disable CDN even in "prod" mode ; Disable CDN even in "prod" mode
OFFLINE_MODE = {{ gitea_offline_mode }} OFFLINE_MODE = {{ gitea_offline_mode | ternary('true', 'false') }}
; Default path for App data ; Default path for App data
APP_DATA_PATH = {{ gitea_home }}/data APP_DATA_PATH = {{ gitea_home }}/data
{% if gitea_lfs_server_enabled | bool -%} {% if gitea_lfs_server_enabled | bool -%}
@ -100,37 +100,33 @@ SECRET_KEY = {{ gitea_secret_key }}
INTERNAL_TOKEN = {{ gitea_internal_token }} INTERNAL_TOKEN = {{ gitea_internal_token }}
; How long to remember that an user is logged in before requiring relogin (in days) ; How long to remember that an user is logged in before requiring relogin (in days)
LOGIN_REMEMBER_DAYS = 7 LOGIN_REMEMBER_DAYS = 7
DISABLE_GIT_HOOKS = {{ gitea_disable_git_hooks }} DISABLE_GIT_HOOKS = {{ gitea_disable_git_hooks | ternary('true', 'false') }}
[service] [service]
; Disallow registration, only allow admins to create accounts. ; Disallow registration, only allow admins to create accounts.
DISABLE_REGISTRATION = {{ gitea_disable_registration }} DISABLE_REGISTRATION = {{ gitea_disable_registration }}
; User must sign in to view anything. ; User must sign in to view anything.
REQUIRE_SIGNIN_VIEW = {{ gitea_require_signin }} REQUIRE_SIGNIN_VIEW = {{ gitea_require_signin | ternary('true', 'false') }}
; Enable captcha validation for registration ; Enable captcha validation for registration
ENABLE_CAPTCHA = {{ gitea_enable_captcha }} ENABLE_CAPTCHA = {{ gitea_enable_captcha | ternary('true', 'false') }}
; Type of captcha you want to use. Options: image, recaptcha ; Type of captcha you want to use. Options: image, recaptcha
CAPTCHA_TYPE = image CAPTCHA_TYPE = image
; Enable recaptcha to use Google's recaptcha service ; Enable recaptcha to use Google's recaptcha service
; Go to https://www.google.com/recaptcha/admin to sign up for a key ; Go to https://www.google.com/recaptcha/admin to sign up for a key
RECAPTCHA_SECRET = RECAPTCHA_SECRET =
RECAPTCHA_SITEKEY = RECAPTCHA_SITEKEY =
; Show Registration button ; Show Registration button
SHOW_REGISTRATION_BUTTON = {{ gitea_show_registration_button }} SHOW_REGISTRATION_BUTTON = {{ gitea_show_registration_button | ternary('true', 'false') }}
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ gitea_only_allow_external_registration }} ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ gitea_only_allow_external_registration | ternary('true', 'false') }}
ENABLE_NOTIFY_MAIL = {{ gitea_enable_notify_mail }} ENABLE_NOTIFY_MAIL = {{ gitea_enable_notify_mail | ternary('true', 'false') }}
[mailer] [mailer]
ENABLED = {{ gitea_mailer_enabled }} ENABLED = {{ gitea_mailer_enabled | ternary('true', 'false') }}
; Mail server ; Mail server
; Gmail: smtp.gmail.com:587 ; Gmail: smtp.gmail.com:587
; QQ: smtp.qq.com:465 ; QQ: smtp.qq.com:465
; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used. ; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used.
HOST = {{ gitea_mailer_host }} HOST = {{ gitea_mailer_host }}
; Disable HELO operation when hostnames are different.
DISABLE_HELO =
; Custom hostname for HELO operation, if no value is provided, one is retrieved from system.
HELO_HOSTNAME =
; Do not verify the certificate of the server. Only use this for self-signed certificates ; Do not verify the certificate of the server. Only use this for self-signed certificates
SKIP_VERIFY = {{ gitea_mailer_skip_verify }} SKIP_VERIFY = {{ gitea_mailer_skip_verify }}
; Use client certificate ; Use client certificate
@ -138,7 +134,7 @@ USE_CERTIFICATE = false
CERT_FILE = {{ gitea_home }}/custom/mailer/cert.pem CERT_FILE = {{ gitea_home }}/custom/mailer/cert.pem
KEY_FILE = {{ gitea_home }}/custom/mailer/key.pem KEY_FILE = {{ gitea_home }}/custom/mailer/key.pem
; Should SMTP connection use TLS ; Should SMTP connection use TLS
IS_TLS_ENABLED = {{ gitea_mailer_tls_enabled }} IS_TLS_ENABLED = {{ gitea_mailer_tls_enabled | ternary('true', 'false') }}
; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format ; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
FROM = {{ gitea_mailer_from }} FROM = {{ gitea_mailer_from }}
; Mailer user name and password ; Mailer user name and password
@ -151,8 +147,6 @@ SEND_AS_PLAIN_TEXT = false
MAILER_TYPE = {{ gitea_mailer_type }} MAILER_TYPE = {{ gitea_mailer_type }}
; Specify an alternative sendmail binary ; Specify an alternative sendmail binary
SENDMAIL_PATH = sendmail SENDMAIL_PATH = sendmail
; Specify any extra sendmail arguments
SENDMAIL_ARGS =
[session] [session]
; Either "memory", "file", or "redis", default is "memory" ; Either "memory", "file", or "redis", default is "memory"
@ -167,7 +161,7 @@ PROVIDER_CONFIG = {{ gitea_home }}/data/sessions
[picture] [picture]
AVATAR_UPLOAD_PATH = {{ gitea_home }}/data/avatars AVATAR_UPLOAD_PATH = {{ gitea_home }}/data/avatars
; This value will always be true in offline mode. ; This value will always be true in offline mode.
DISABLE_GRAVATAR = {{ gitea_disable_gravatar }} DISABLE_GRAVATAR = {{ gitea_disable_gravatar | ternary('true', 'false') }}
[attachment] [attachment]
; Whether attachments are enabled. Defaults to `true` ; Whether attachments are enabled. Defaults to `true`
@ -183,7 +177,7 @@ MODE = file
; Buffer length of the channel, keep it as it is if you don't know what it is. ; Buffer length of the channel, keep it as it is if you don't know what it is.
BUFFER_LEN = 10000 BUFFER_LEN = 10000
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace" ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
LEVEL = Info LEVEL = {{ gitea_log_level }}
REDIRECT_MACARON_LOG = false REDIRECT_MACARON_LOG = false
[oauth2] [oauth2]