Fix cinder role condition when no cinder_volumes
If there is no machine in the group cinder_volume, the condition inventory_hostname in groups['cinder_volume'][0] will fail. Because we run this role even when there is no cinder_volume defined, this causes a failures for deployments with no cinder. This commit is a short term fix until we properly document how to use finer-grained groups instead of the generic os-infra_hosts for all the services. Closes-Bug: 1596918 Change-Id: I214a62f48befe7d5fd54c22b4b64c33e2c346629 Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
This commit is contained in:
parent
14e7fe0d1d
commit
62c3a8025e
@ -50,14 +50,16 @@
|
||||
- cinder-config
|
||||
|
||||
- include: cinder_db_setup.yml
|
||||
when: >
|
||||
inventory_hostname == groups['cinder_all'][0]
|
||||
when:
|
||||
- groups['cinder_all'] | length > 0
|
||||
- inventory_hostname == groups['cinder_all'][0]
|
||||
tags:
|
||||
- cinder-install
|
||||
|
||||
- include: cinder_service_setup.yml
|
||||
when: >
|
||||
inventory_hostname == groups['cinder_all'][0]
|
||||
when:
|
||||
- groups['cinder_all'] | length > 0
|
||||
- inventory_hostname == groups['cinder_all'][0]
|
||||
tags:
|
||||
- cinder-install
|
||||
|
||||
@ -69,8 +71,9 @@
|
||||
meta: flush_handlers
|
||||
|
||||
- include: cinder_backends.yml
|
||||
when: >
|
||||
inventory_hostname in groups['cinder_volume'][0]
|
||||
when:
|
||||
- groups['cinder_volume'] | length > 0
|
||||
- inventory_hostname in groups['cinder_volume'][0]
|
||||
tags:
|
||||
- cinder-install
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user