aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorPaul Bourke <paul.bourke@oracle.com>2016-10-05 11:07:15 +0100
committerPaul Bourke <paul.bourke@oracle.com>2016-10-05 12:12:35 +0100
commit792f16cc9f1d30eb4aaa8f0e8218e4cfc82ae572 (patch)
tree8340bf36d3a88b1ffa1ccb590539ee479cb6fd8f /ansible
parentcc0709792ba0d9fa03e53307f3fa833d4e44552b (diff)
downloadkolla-792f16cc9f1d30eb4aaa8f0e8218e4cfc82ae572.tar.gz
kolla-792f16cc9f1d30eb4aaa8f0e8218e4cfc82ae572.zip
Fix horizon to use cache
Horizon was missing SESSION_ENGINE from it's conf which means it was not making use of memcached. Change-Id: I450aee05f59e344902f1e92d913f4c1ce9e8dcc6 Closes-Bug: 1630509
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/horizon/templates/local_settings.j23
1 files changed, 3 insertions, 0 deletions
diff --git a/ansible/roles/horizon/templates/local_settings.j2 b/ansible/roles/horizon/templates/local_settings.j2
index cabaf99af..c5abb28d3 100644
--- a/ansible/roles/horizon/templates/local_settings.j2
+++ b/ansible/roles/horizon/templates/local_settings.j2
@@ -158,6 +158,8 @@ SECRET_KEY='{{ horizon_secret_key }}'
# },
#}
+{% if groups['memcached'] | length > 0 and horizon_backend_database | bool == False %}
+SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
@@ -169,6 +171,7 @@ CACHES = {
{%- endif %}
}
}
+{% endif %}
# Send email to the console by default
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'