From 6480a0dac4391ad3170c311b7588c5f34ccc852b Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 27 May 2020 11:46:51 -0700 Subject: [PATCH] bodhi: use fqdn for database. it seems to not resolve sometimes in openshift Signed-off-by: Kevin Fenzi --- roles/bodhi2/base/templates/production.ini.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/bodhi2/base/templates/production.ini.j2 b/roles/bodhi2/base/templates/production.ini.j2 index e964fb7eed..a6a82d1d2d 100644 --- a/roles/bodhi2/base/templates/production.ini.j2 +++ b/roles/bodhi2/base/templates/production.ini.j2 @@ -697,8 +697,10 @@ debugtoolbar.hosts = 127.0.0.1 ::1 # suitable for a production environment. You can encode a username and password in the URL. For # example, postgresql://username:password@hostname/database_name # sqlalchemy.url = sqlite:////var/cache/bodhi.db -{% if env == 'production' %} -sqlalchemy.url = postgresql://bodhi2:{{ bodhi2Password }}@db-bodhi/bodhi2 +{% if env == 'production' and datacenter == 'phx2' %} +sqlalchemy.url = postgresql://bodhi2:{{ bodhi2Password }}@db-bodhi.phx2.fedoraproject.org/bodhi2 +{% elif env == 'production' and datacenter == 'iad2' %} +sqlalchemy.url = postgresql://bodhi2:{{ bodhi2Password }}@db-bodhi.iad2.fedoraproject.org/bodhi2 {% elif env == 'staging' %} sqlalchemy.url = postgresql://bodhi2:{{ bodhi2PasswordSTG }}@pgbdr.stg.phx2.fedoraproject.org/bodhi2 {% endif %}