From 9c1940e461867f2ce986a81fa313d7995592f0c5 Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Wed, 24 May 2017 18:45:59 +0200 Subject: Provides a list of per-service ctlplane IPs to the workflows env Adds in the execution environment of the workflow steps a list of per-service network IPs. This can be used by the workflows to execute actions against the nodes hosting a given service. Change-Id: Id7c735d53f04f6ad848b2f9f1adaa3c84ecd2fcd Implements: blueprint tripleo-ceph-ansible --- overcloud.j2.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'overcloud.j2.yaml') diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index bc74a5ac..448f6d8b 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -737,6 +737,18 @@ resources: {% endfor %} stack_name: {get_param: 'OS::stack_name'} EndpointMap: {get_attr: [EndpointMap, endpoint_map]} + ctlplane_service_ips: + # Note (shardy) this somewhat complex yaql may be replaced + # with a map_deep_merge function in ocata. It merges the + # list of maps, but appends to colliding lists when a service + # is deployed on more than one role + yaql: + expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], [$[0], $[1].flatten()])) + data: + l: +{% for role in roles %} + - {get_attr: [{{role.name}}IpListMap, ctlplane_service_ips]} +{% endfor %} role_data: {% for role in roles %} {{role.name}}: {get_attr: [{{role.name}}ServiceChainRoleData, value]} -- cgit 1.2.3-korg