From 1cd4a307c0c54183ae4bbf3c43ea2a9e50374204 Mon Sep 17 00:00:00 2001 From: David Moreau-Simard Date: Mon, 28 Aug 2017 19:11:06 -0400 Subject: [PATCH] Add the private_ipv4 hostvar to primary and sub nodes This will allow us to reliably set up the bridge on the right IPs in the follow up network overlay patch. The private_ipv4 key is inside the nodepool dict to be forward compatible with the hostvars provided by zuul v3. Co-Authored-By: Clark Boylan Co-Authored-By: David Moreau Simard Change-Id: I34663fc482d71781d1e05455edb18c4a86aa5afb --- devstack-vm-gate-wrap.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index 80bd72f7..d7aa6d89 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -487,13 +487,14 @@ export DSCONF=/tmp/ansible/bin/dsconf # Write inventory file with groupings COUNTER=1 +PRIMARY_NODE=$(cat /etc/nodepool/primary_node_private) echo "[primary]" > "$WORKSPACE/inventory" -echo "localhost ansible_connection=local host_counter=$COUNTER" >> "$WORKSPACE/inventory" +echo "localhost ansible_connection=local host_counter=$COUNTER nodepool='{\"private_ipv4\": \"$PRIMARY_NODE\"}'" >> "$WORKSPACE/inventory" echo "[subnodes]" >> "$WORKSPACE/inventory" export SUBNODES=$(cat /etc/nodepool/sub_nodes_private) for SUBNODE in $SUBNODES ; do let COUNTER=COUNTER+1 - echo "$SUBNODE host_counter=$COUNTER" >> "$WORKSPACE/inventory" + echo "$SUBNODE host_counter=$COUNTER nodepool='{\"private_ipv4\": \"$SUBNODE\"}'" >> "$WORKSPACE/inventory" done # Write ansible config file