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 <cboylan@sapwetik.org> Co-Authored-By: David Moreau Simard <dmsimard@redhat.com> Change-Id: I34663fc482d71781d1e05455edb18c4a86aa5afb
This commit is contained in:
parent
206394e3cb
commit
1cd4a307c0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue