From 6a83a6dfa34f828c59bfccf9b3a6d2ef1ac3c976 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 4 Jun 2018 19:31:18 -0500 Subject: [PATCH] roles/gitea: Allow configuring clone URLs The `gitea_ssh_domain` and `gitea_http_domain` variables can be used to configure the host portion of the URLs for cloning Git repositories over SSH and HTTPS, respectively. By default, both values are the FQDN of the machine hosting Gitea. --- roles/gitea/defaults/main.yml | 3 +++ roles/gitea/templates/app.ini.j2 | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 roles/gitea/defaults/main.yml diff --git a/roles/gitea/defaults/main.yml b/roles/gitea/defaults/main.yml new file mode 100644 index 0000000..0b76479 --- /dev/null +++ b/roles/gitea/defaults/main.yml @@ -0,0 +1,3 @@ +gitea_ssh_domain: '{{ ansible_fqdn }}' +gitea_http_domain: '{{ gitea_ssh_domain }}' +gitea_root_url: 'http://{{ gitea_http_domain }}:3000/' diff --git a/roles/gitea/templates/app.ini.j2 b/roles/gitea/templates/app.ini.j2 index f2c7428..b02d63c 100644 --- a/roles/gitea/templates/app.ini.j2 +++ b/roles/gitea/templates/app.ini.j2 @@ -21,10 +21,10 @@ ROOT = /var/lib/gitea/gitea-repositories [server] APP_DATA_PATH = /var/lib/gitea -SSH_DOMAIN = localhost -DOMAIN = localhost +SSH_DOMAIN = {{ gitea_ssh_domain }} +DOMAIN = {{ gitea_http_domain }} HTTP_PORT = 3000 -ROOT_URL = http://localhost:3000/ +ROOT_URL = {{ gitea_root_url }} DISABLE_SSH = false SSH_PORT = 22 LFS_START_SERVER = true