From 35d8c8799ebf9af67a537d9cf4c5409906bdb32a Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 29 Jun 2021 20:16:09 +0200 Subject: [PATCH] The hostname can differ from ansible_fqdn. --- defaults/main.yml | 3 ++- templates/app.ini.j2 | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index f1a5ebc..6aa7402 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -23,9 +23,10 @@ gitea_repository_data: '{{ gitea_data_dir }}/repositories' gitea_max_repository_per_user: 200 gitea_server_protocol: unix +gitea_hostname: '{{ ansible_fqdn }}' gitea_http_addr: '{{ gitea_socket_dir }}/gitea.sock' gitea_http_port: 3000 -gitea_root_url: https://{{ ansible_fqdn }} +gitea_root_url: https://{{ gitea_hostname }} # home, explore gitea_landing_page: explore diff --git a/templates/app.ini.j2 b/templates/app.ini.j2 index f49da44..48a9957 100644 --- a/templates/app.ini.j2 +++ b/templates/app.ini.j2 @@ -14,8 +14,8 @@ LANDING_PAGE = {{ gitea_landing_page }} LFS_START_SERVER = {{ gitea_start_lfs }} LFS_CONTENT_PATH = {{ gitea_lfs_content_path }} LFS_HTTP_AUTH_EXPIRY = {{ gitea_lfs_http_auth_expiry }} -SSH_DOMAIN = localhost -DOMAIN = localhost +SSH_DOMAIN = {{ gitea_hostname }} +DOMAIN = {{ gitea_hostname }} HTTP_PORT = {{ gitea_http_port }} ROOT_URL = {{ gitea_root_url }} DISABLE_SSH = false