From 989b0c433debc5f7c09dd8bb5cfe463ff1213ceb Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Thu, 27 Jan 2022 15:53:38 +0100 Subject: [PATCH] Fix pagure templating to take its own IP v6 in account ssh git@pagure.io was broken (no longer accepting ssh connection). A quick debug show that it was caused by the helper script not working, showing a 403 error. And the httpd logs were complaining about authorized IPs not present in the configuration. The root cause is in 938e63fa711 as the variables were renamed from eth0_ip and eth0_ipv6 to eth0_ipv4_ip and eth0_ipv6_ip Then pagure config got regenerated later and this triggered the bug preventing people from pushing. --- roles/pagure/templates/pagure.cfg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/pagure/templates/pagure.cfg b/roles/pagure/templates/pagure.cfg index 7905aea144..b5c28c7c4b 100644 --- a/roles/pagure/templates/pagure.cfg +++ b/roles/pagure/templates/pagure.cfg @@ -79,10 +79,10 @@ GIT_URL_GIT = 'https://pagure.io/' {% endif %} ### The IP addresses allowed for the internal endpoints -{% if eth0_ipv6 is defined %} -IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1', '{{ eth0_ip }}' , '{{ eth0_ipv6 }}'] -{% elif eth0_ip is defined %} -IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1', '{{ eth0_ip }}'] +{% if eth0_ipv6_ip is defined %} +IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1', '{{ eth0_ipv4_ip }}' , '{{ eth0_ipv6_ip }}'] +{% elif eth0_ipv4_ip is defined %} +IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1', '{{ eth0_ipv4_ip }}'] {% else %} IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1'] {% endif %}