From d6a08eede3b5e3c415352fe921b65a3e23a34519 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 13 May 2016 15:49:06 +0000 Subject: [PATCH] Fix use of env_prefix --- roles/koschei/frontend/templates/config-frontend.cfg.j2 | 2 +- roles/koschei/frontend/templates/httpd.conf.j2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/koschei/frontend/templates/config-frontend.cfg.j2 b/roles/koschei/frontend/templates/config-frontend.cfg.j2 index db06ac17f0..b5dad2dfc2 100644 --- a/roles/koschei/frontend/templates/config-frontend.cfg.j2 +++ b/roles/koschei/frontend/templates/config-frontend.cfg.j2 @@ -2,6 +2,7 @@ # configuration in /usr/share/koschei/config.cfg. It is a python file expecting # assignment to config dictionary which will be recursively merged with the # default one. +{% set env_prefix = ".stg" if env == "staging" else "" %} config = { "database_config": { "host": "{{ koschei_pgsql_hostname }}", @@ -80,7 +81,6 @@ config = { }, {% if False %} # this is for > 1.6.1 "links": [ - {% set env_prefix = ".stg" if env == "staging" else "" %} {"name": "Packages", "url": "https://apps{{ env_prefix }}.fedoraproject.org/packages/{package.name}"}, {"name": "PkgDB", diff --git a/roles/koschei/frontend/templates/httpd.conf.j2 b/roles/koschei/frontend/templates/httpd.conf.j2 index 078ecf1049..12abf67adb 100644 --- a/roles/koschei/frontend/templates/httpd.conf.j2 +++ b/roles/koschei/frontend/templates/httpd.conf.j2 @@ -21,8 +21,8 @@ Require valid-user AuthType OpenID AuthOpenIDSingleIdP https://{{ koschei_openid_provider }}/ - AuthOpenIDServerName https://apps{{ env_prefix }}.fedoraproject.org - AuthOpenIDTrustRoot https://apps{{ env_prefix }}.fedoraproject.org/koschei/ + AuthOpenIDServerName https://apps.stg.fedoraproject.org + AuthOpenIDTrustRoot https://apps.stg.fedoraproject.org/koschei/ AuthOpenIDSecureCookie on {% endif %}