Fix cinder_service_region undefined

Due to the simplification of group vars [1], we've removed the
definition of cinder_service_region for magnum.

We could put cinder_service_region in all group vars instead,
but it looks like the scoping is done wrong.
We should instead rely on save defaults on the role, that can
be overriden.

Here, we introduce the variable magnum_cinder_service_region,
which defaults to magnum_service_region, i.e. "RegionOne".

We can remove the need for an override that way, and properly
scope variables.

[1]: https://review.openstack.org/#/c/504804/18/group_vars/all/cinder.yml

Depends-On: Ia8417bbdac3f515e42d1ed760110a63ae14f8f00

Change-Id: Id25c2d344859adfd09108b759d55f11ae83f97a9
(cherry picked from commit cf0a3c9bac)
This commit is contained in:
Jean-Philippe Evrard 2017-09-27 09:40:40 +01:00 committed by Mohammed Naser
parent e1db4e98c8
commit 494a5b7e5e
3 changed files with 2 additions and 2 deletions

View File

@ -40,6 +40,7 @@ magnum_service_project_name: service
magnum_service_role_names:
- admin
magnum_service_region: RegionOne
magnum_cinder_service_region: "{{ magnum_service_region }}"
magnum_bind_port: 9511
magnum_service_publicuri_proto: http
magnum_service_publicurl: "{{ magnum_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ magnum_bind_port }}"

View File

@ -12,7 +12,7 @@ host = {{ ansible_host }}
endpoint_type = internalURL
[cinder_client]
region_name = {{ cinder_service_region }}
region_name = {{ magnum_cinder_service_region }}
endpoint_type = internalURL
[database]

View File

@ -1,6 +1,5 @@
---
magnum_developer_mode: true
cinder_service_region: RegionOne
magnum_galera_password: secrete
magnum_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_host'] }}"
magnum_service_password: secrete