From 03421f809747681f85430d9ac63d722d7e444688 Mon Sep 17 00:00:00 2001
From: Steven Hardy <shardy@redhat.com>
Date: Tue, 11 Apr 2017 16:26:39 +0100
Subject: [PATCH] Add RoleNetIpMap output to overcloud.j2.yaml

To enable easier detection of the IPs associated with nodes (such
as to enable the tripleo-validations ansible inventory to work with
custom roles more easily) expose the data we already have about the
nodes/roles and the list of IPs for each network.

Change-Id: I5667a142f47fbff120c703bedadd8b6e163c9480
---
 overcloud.j2.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml
index a322a445..8998ce11 100644
--- a/overcloud.j2.yaml
+++ b/overcloud.j2.yaml
@@ -691,4 +691,10 @@ outputs:
     value:
 {% for role in roles %}
       {{role.name}}: {get_attr: [{{role.name}}ServiceChain, role_data]}
+{% endfor %}
+  RoleNetIpMap:
+    description: Mapping of each network to a list of IPs for each role
+    value:
+{% for role in roles %}
+      {{role.name}}: {get_attr: [{{role.name}}IpListMap, net_ip_map]}
 {% endfor %}
-- 
2.16.6