From 49defcf825ebffb3753759826a5c6b28c381116a Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 29 Mar 2019 19:45:22 +0100 Subject: [PATCH] Fixes to the gitea role and configuration template. --- gitea/defaults/main.yml | 21 ++++++++++++--------- gitea/templates/app.ini.j2 | 12 ++++++++++-- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/gitea/defaults/main.yml b/gitea/defaults/main.yml index 64b08b9..5744264 100644 --- a/gitea/defaults/main.yml +++ b/gitea/defaults/main.yml @@ -21,12 +21,15 @@ gitea_repository_data: '{{ gitea_data_dir }}/repositories' gitea_server_protocol: unix gitea_http_addr: '{{ gitea_data_dir }}/sock/gitea.sock' +gitea_http_port: 3000 +gitea_root_url: https://{{ ansible_fqdn }} + # home, explore -gitea_landing_page: home +gitea_landing_page: explore gitea_user: gitea gitea_group: '{{ gitea_user }}' gitea_run_mode: prod -gitea_db: postgresql +gitea_db: postgres gitea_local_postgresql: True gitea_local_mysql: False gitea_local_mariadb: False @@ -47,9 +50,8 @@ gitea_db_user: gitea_u #gitea_db_pwd: put it into a vault file gitea_db_host: localhost gitea_db_port: 5432 -gitea_db_ssl_mode: 'enable' +gitea_db_ssl_mode: 'disable' -gitea_ldap_auth: False gitea_app_name: "Gitea" gitea_disable_registration: 'false' gitea_install_lock: 'false' @@ -57,12 +59,13 @@ gitea_mailer_enabled: False gitea_mail_from: gitea@localhost gitea_mailer_type: sendmail gitea_sendmail_path: /usr/sbin/sendmail -gitea_cache_provider: redis +gitea_cache_provider: memcache #gitea_cache_host: '127.0.0.1:11211' -gitea_cache_host: 'network=tcp,addr=127.0.0.1:6379,password=macaron,db=0,pool_size=100,idle_timeout=180' -gitea_session_provider: memcache -gitea_session_config: '127.0.0.1:11211' +gitea_cache_host: '127.0.0.1:11211' +gitea_session_provider: redis +gitea_session_config: 'network=tcp,addr=127.0.0.1:6379,db=0,pool_size=100,idle_timeout=180' gitea_prometheus_metrics: False #gitea_prometheus_bearer_token: put it into a vault file -gitea_prometheus_bearer_token: '' \ No newline at end of file +gitea_prometheus_bearer_token: '' +gitea_log_level: Info diff --git a/gitea/templates/app.ini.j2 b/gitea/templates/app.ini.j2 index 4e41a1b..879ed5d 100644 --- a/gitea/templates/app.ini.j2 +++ b/gitea/templates/app.ini.j2 @@ -1,4 +1,3 @@ -[default] APP_NAME = {{ gitea_app_name }} RUN_USER = {{ gitea_user }} RUN_MODE= {{ gitea_run_mode }} @@ -12,8 +11,14 @@ HTTP_ADDR = {{ gitea_http_addr }} LANDING_PAGE = {{ gitea_landing_page }} LFS_START_SERVER = {{ gitea_start_lfs }} LFS_CONTENT_PATH = {{ gitea_lfs_content_path }} -LFS_JWT_SECRET = {{ gitea_lfs_jwt_secret }} LFS_HTTP_AUTH_EXPIRY = {{ gitea_lfs_http_auth_expiry }} +SSH_DOMAIN = localhost +DOMAIN = localhost +HTTP_PORT = {{ gitea_http_port }} +ROOT_URL = {{ gitea_root_url }} +DISABLE_SSH = false +SSH_PORT = 22 +OFFLINE_MODE = false [database] DB_TYPE = {{ gitea_db }} @@ -28,6 +33,7 @@ INSTALL_LOCK = {{ gitea_install_lock }} [service] DISABLE_REGISTRATION = {{ gitea_disable_registration }} +NO_REPLY_ADDRESS = {{ gitea_mail_from }} {% if gitea_mailer_enabled %} [mailer] @@ -55,3 +61,5 @@ TOKEN = '{{ gitea_prometheus_bearer_token }}' SHOW_FOOTER_VERSION = false SHOW_FOOTER_TEMPLATE_LOAD_TIME = false +[log] +LEVEL = {{ gitea_log_level }} \ No newline at end of file