diff --git a/defaults/main.yml b/defaults/main.yml index 6b8eaee1..364ad611 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -67,6 +67,12 @@ horizon_ssl_cert_path: /etc/ssl/certs horizon_ssl_protocol: "{{ ssl_protocol }}" horizon_ssl_cipher_suite: "{{ ssl_cipher_suite }}" +# For multiple regions uncomment this configuration, and +# add the extra endpoints below the first list item. +# horizon_available_regions: +# - { url: "{{ keystone_service_internalurl }}", name: "{{ keystone_service_region }}" } +# - { url: "http://cluster1.example.com:5000/v2.0", name: "RegionTwo" } + ## Launch instance horizon_launch_instance_legacy: True horizon_launch_instance_ng: False diff --git a/templates/horizon_local_settings.py.j2 b/templates/horizon_local_settings.py.j2 index 833daab6..87e246bb 100644 --- a/templates/horizon_local_settings.py.j2 +++ b/templates/horizon_local_settings.py.j2 @@ -155,11 +155,20 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' # EMAIL_HOST_USER = 'djangomail' # EMAIL_HOST_PASSWORD = 'top-secret!' +{% if horizon_available_regions is defined %} +# Set the regions accessible through Horizon +AVAILABLE_REGIONS = [ +{% for item in horizon_available_regions %} + ('{{ item.url }}', '{{ item.name }}'), +{% endfor %} +] +{% else %} # For multiple regions uncomment this configuration, and add (endpoint, title). # AVAILABLE_REGIONS = [ # ('http://cluster1.example.com:5000/v2.0', 'cluster1'), # ('http://cluster2.example.com:5000/v2.0', 'cluster2'), # ] +{% endif %} OPENSTACK_HOST = "{{ internal_lb_vip_address }}" OPENSTACK_KEYSTONE_URL = "{{ keystone_service_internalurl }}"