Fix enabled_services to include all_nodes_extra_map_data

When the tripleo-hieradata role was imported[1] from tripleo-common[2],
the handling to create all_enabled_services from enabled_services and
all_nodes_extra_map_data was lost.

This caused several data items to be missing in the multi-stack case.

This patch restores the original functionality.

[1] https://review.opendev.org/#/c/673364/
[2] https://review.opendev.org/#/c/673366/

Change-Id: Ia58fd299942954c39214bad76cbcf40ad4371f18
changes/29/693729/2
James Slagle 3 years ago
parent 943e499b8c
commit 98a9181fad
  1. 5
      tripleo_ansible/roles/tripleo-hieradata/templates/all_nodes.j2

@ -1,6 +1,7 @@
{% set all_nodes = {} %}
{% set _ = all_nodes.__setitem__('enabled_services', ((enabled_services + all_nodes_extra_map_data['enabled_services'] | default ([])) | unique)) %}
{% for service in enabled_services %}
{% set all_enabled_services = ((enabled_services + all_nodes_extra_map_data['enabled_services'] | default ([])) | unique) %}
{% set _ = all_nodes.__setitem__('enabled_services', all_enabled_services) %}
{% for service in all_enabled_services %}
{# <service>_enabled: true #}
{% set _ = all_nodes.__setitem__((service ~ '_enabled'), true) %}
{# <service>_node_ips: <list of ips> #}

Loading…
Cancel
Save