Make the memcached dependency optional

Otherwise if you don't have memcached horizon will never
start.

Change-Id: Ibd3f5c5be20a70d6b7983b8ef9c0c34cd44a15cc
This commit is contained in:
Angus Salkeld 2016-02-19 12:14:39 +10:00
parent df2c93befd
commit 88a3f2d21c
2 changed files with 6 additions and 1 deletions

View File

@ -8,7 +8,11 @@ container:
service: service:
daemon: daemon:
command: /usr/sbin/{{ apache_cmd }} -DFOREGROUND command: /usr/sbin/{{ apache_cmd }} -DFOREGROUND
dependencies: [horizon/bootstrap, memcached/daemon] dependencies:
- horizon/bootstrap
{% if enable_memcached | bool %}
- memcached/daemon
{% endif %}
files: files:
000-default.conf: 000-default.conf:
source: config/horizon/templates/horizon.conf.j2 source: config/horizon/templates/horizon.conf.j2

View File

@ -91,6 +91,7 @@ def validate_command(filename, cmd, cmd_info, deps, role):
def validate(filename, deps): def validate(filename, deps):
mini_vars = {'cinder_volume_driver': 'lvm', mini_vars = {'cinder_volume_driver': 'lvm',
'enable_memcached': 'yes',
'deployment_id': 'test'} 'deployment_id': 'test'}
role = filename.replace('.yml.j2', '') role = filename.replace('.yml.j2', '')
role_vars = ROLE_VARS_MAP.get(role, {}) role_vars = ROLE_VARS_MAP.get(role, {})