From db1bd3091d686040daeac01da34df629303061e0 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 25 Jan 2022 17:22:04 +0200 Subject: [PATCH] Fix default multidomain choices We're missing comma at the end of set, which leads to error. We additionally define condition when choices will be added to config. Change-Id: I6b1c24fae22e9adb9e16fade4229d5761ac0b520 Closes-Bug: #1958645 --- defaults/main.yml | 2 +- templates/horizon_local_settings.py.j2 | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 2d874381..24cf9aec 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -261,7 +261,7 @@ horizon_keystone_default_domain: Default # Option to set the available domains to choose from. This is # a list of pairs whose first value is the domain name and the # second is the display name. -horizon_keystone_multidomain_choices: "(('{{ horizon_keystone_default_domain }}', '{{ horizon_keystone_default_domain }}'))" +horizon_keystone_multidomain_choices: "(('{{ horizon_keystone_default_domain }}', '{{ horizon_keystone_default_domain }}'),)" # Enable/disable v2 openrc file download in horizon. horizon_show_keystone_v2_rc: True diff --git a/templates/horizon_local_settings.py.j2 b/templates/horizon_local_settings.py.j2 index 47433d37..fd8f59e4 100644 --- a/templates/horizon_local_settings.py.j2 +++ b/templates/horizon_local_settings.py.j2 @@ -90,7 +90,9 @@ OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = {{ horizon_keystone_multidomain_support OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "{{ horizon_keystone_default_domain }}" {% else %} OPENSTACK_KEYSTONE_DOMAIN_DROPDOWN = {{ horizon_keystone_multidomain_dropdown | bool }} +{% if horizon_keystone_multidomain_dropdown %} OPENSTACK_KEYSTONE_DOMAIN_CHOICES = {{ horizon_keystone_multidomain_choices }} +{% endif %} {% endif %} {% endif %}