Merge "Allow Travis CI to run parallel tests"
diff --git a/README.rst b/README.rst
index afebedb..afd5dce 100644
--- a/README.rst
+++ b/README.rst
@@ -35,6 +35,16 @@
         mail:
           host: '127.0.0.1'
 
+Multidomain setup for horizon
+
+.. code-block:: yaml
+
+    horizon:
+      server:
+        enabled: true
+        default_domain: MYDOMAIN
+        multidomain: True
+
 Simple branded horizon
 
 .. code-block:: yaml
diff --git a/horizon/files/horizon_settings/_keystone_settings.py b/horizon/files/horizon_settings/_keystone_settings.py
index 72882ff..686eb92 100644
--- a/horizon/files/horizon_settings/_keystone_settings.py
+++ b/horizon/files/horizon_settings/_keystone_settings.py
@@ -1,4 +1,5 @@
 {%- from "horizon/map.jinja" import server with context %}
+{%- from "horizon/map.jinja" import multidomain,default_domain with context %}
 
 {%- if server.app is defined %}
 {%- set app = salt['pillar.get']('horizon:server:app:'+app_name) %}
@@ -39,10 +40,8 @@
 OPENSTACK_KEYSTONE_URL = "http{% if app.identity.encryption == 'ssl' %}s{% endif %}://%s:{{ app.identity.port }}/v2.0" % OPENSTACK_HOST
 {%- endif %}
 
-{%- if app.get('multidomain', false) %}
-OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
-OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'default'
-{%- endif %}
+OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = {{ multidomain }}
+OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "{{ default_domain }}"
 
 OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
 
diff --git a/horizon/map.jinja b/horizon/map.jinja
index 806ab08..7fec03e 100644
--- a/horizon/map.jinja
+++ b/horizon/map.jinja
@@ -1,4 +1,6 @@
 {%- set dashboard_package = salt['pillar.get']('horizon:server:package', 'openstack-dashboard') %}
+{%- set multidomain = salt['pillar.get']('horizon:server:multidomain', 'False') %}
+{%- set default_domain = salt['pillar.get']('horizon:server:default_domain', 'default') %}
 
 {% set server = salt['grains.filter_by']({
     'Debian': {
diff --git a/tests/pillar/single.sls b/tests/pillar/single.sls
index debbb4a..d06d73d 100644
--- a/tests/pillar/single.sls
+++ b/tests/pillar/single.sls
@@ -34,4 +34,6 @@
     horizon_config:
       password_autocomplete: off
     openstack_neutron_network:
-      enable_fip_topology_check: False
\ No newline at end of file
+      enable_fip_topology_check: False
+    default_domain: default
+    multidomain: False