diff --git a/roles/openshift-apps/koschei/templates/config-admin.cfg.j2 b/roles/openshift-apps/koschei/templates/config-admin.cfg.j2 index 306908e600..48dc57dbf1 100644 --- a/roles/openshift-apps/koschei/templates/config-admin.cfg.j2 +++ b/roles/openshift-apps/koschei/templates/config-admin.cfg.j2 @@ -5,12 +5,8 @@ config = { "database_config": { - "username": "koscheiadmin", -{% if env == 'staging' %} - "password": "{{ koscheiadmin_db_password }}", -{% else %} - "password": "{{ koscheiadmin_stg_db_password }}", -{% endif %} + "username": "{{ koschei_pgsql_admin_username }}", + "password": "{{ koschei_pgsql_admin_password }}", }, } diff --git a/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 b/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 index ea7475a106..c12dc40b2c 100644 --- a/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 +++ b/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 @@ -6,12 +6,8 @@ config = { "database_config": { "host": "{{ koschei_pgsql_hostname }}", - "username": "koscheiuser", -{% if env == 'staging' %} - "password": "{{ koscheiuser_stg_db_password }}", -{% else %} - "password": "{{ koscheiuser_db_password }}", -{% endif %} + "username": "{{ koschei_pgsql_username }}", + "password": "{{ koschei_pgsql_password }}", "database": "koschei" }, "koji_config": { diff --git a/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 b/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 index 486eadd357..f998b882f3 100644 --- a/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 +++ b/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 @@ -5,12 +5,8 @@ config = { "database_config": { "host": "{{ koschei_pgsql_hostname }}", - "username": "koscheiuser", -{% if env == 'staging' %} - "password": "{{ koscheiuser_stg_db_password }}", -{% else %} - "password": "{{ koscheiuser_db_password }}", -{% endif %} + "username": "{{ koschei_pgsql_username }}", + "password": "{{ koschei_pgsql_password }}", "database": "koschei" }, "koji_config": { diff --git a/roles/openshift-apps/koschei/vars/production.yml b/roles/openshift-apps/koschei/vars/production.yml index 0110fa369d..03a846e524 100644 --- a/roles/openshift-apps/koschei/vars/production.yml +++ b/roles/openshift-apps/koschei/vars/production.yml @@ -11,6 +11,11 @@ koschei_koji_web: koji.fedoraproject.org koschei_oidc_provider: id.fedoraproject.org koschei_bugzilla: bugzilla.redhat.com +koschei_pgsql_username: koscheiuser +koschei_pgsql_password: "{{ koscheiuser_db_password }}" +koschei_pgsql_admin_username: koscheiadmin +koschei_pgsql_admin_password: "{{ koscheiadmin_db_password }}" + koschei_oidc_client_secret: "{{ koschei_oidc_client_secret_prod }}" koschei_oidc_crypto_secret: "{{ koschei_oidc_crypto_secret_prod }}" diff --git a/roles/openshift-apps/koschei/vars/staging.yml b/roles/openshift-apps/koschei/vars/staging.yml index b06e5fa083..3acf4acee4 100644 --- a/roles/openshift-apps/koschei/vars/staging.yml +++ b/roles/openshift-apps/koschei/vars/staging.yml @@ -11,6 +11,11 @@ koschei_koji_web: koji.stg.fedoraproject.org koschei_oidc_provider: id.stg.fedoraproject.org koschei_bugzilla: bugzilla5.redhat.com +koschei_pgsql_username: koscheiuser +koschei_pgsql_password: "{{ koscheiuser_stg_db_password }}" +koschei_pgsql_admin_username: koscheiadmin +koschei_pgsql_admin_password: "{{ koscheiadmin_stg_db_password }}" + koschei_oidc_client_secret: "{{ koschei_oidc_client_secret_stg }}" koschei_oidc_crypto_secret: "{{ koschei_oidc_crypto_secret_stg }}"