Create <service> _cell_node_names if nova_additional_cell

I9a37d1faec73a81a28d8f89d86375fb15ee765c7 moved to use ansible
for all_nodes hieradata. This also removed to create the
SERVICE_cell_node_names in in net_ip_list_map.j2.yaml.
This change creates the <service> _cell_node_names if
nova_additional_cell is true.

Depends-On: https://review.opendev.org/670487

Change-Id: I33effbf481682402d39436a9e97cbd3ee2044577
This commit is contained in:
Martin Schuppert 2019-07-12 12:06:03 +02:00
parent 6c381d55bd
commit 70b1daa42b
1 changed files with 5 additions and 0 deletions

View File

@ -9,8 +9,13 @@
{# <service>_node_ips: <list of ips> #}
{{ '"' ~ service ~ '_node_ips": ' ~ (groups[service] | default ([]) | map('extract', hostvars, service_net_map[service ~ '_network'] | default('ctlplane') ~ '_ip') | list | to_json) ~ ',' }}
{% if nova_additional_cell %}
{# <service>_cell_node_names: <list of hostnames> #}
{{ '"' ~ service ~ '_cell_node_names": ' ~ (groups[service] | default ([]) | map('extract', hostvars, service_net_map[service ~ '_network'] | default('ctlplane') ~ '_hostname') | list | to_json) ~ ',' }}
{% else %}
{# <service>_node_names: <list of hostnames> #}
{{ '"' ~ service ~ '_node_names": ' ~ (groups[service] | default ([]) | map('extract', hostvars, service_net_map[service ~ '_network'] | default('ctlplane') ~ '_hostname') | list | to_json) ~ ',' }}
{% endif %}
{# <service>_short_node_names: <list of hostnames> #}
{{ '"' ~ service ~ '_short_node_names": ' ~ (groups[service] | default ([]) | map('extract', hostvars, 'inventory_hostname') | list | to_json) ~ ',' }}