From 663bfa2450f6bd1167d6c402883260ba8d01089d Mon Sep 17 00:00:00 2001 From: Re Alvarez Parmar Date: Thu, 2 Nov 2023 13:47:24 -0700 Subject: [PATCH] Update configure-bluechi-controller.sh --- rhivos-bluechi/configure-bluechi-controller.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rhivos-bluechi/configure-bluechi-controller.sh b/rhivos-bluechi/configure-bluechi-controller.sh index 049c4c6..5ff39ae 100644 --- a/rhivos-bluechi/configure-bluechi-controller.sh +++ b/rhivos-bluechi/configure-bluechi-controller.sh @@ -32,25 +32,25 @@ export AWS_REGION=$(curl --silent http://169.254.169.254/latest/dynamic/instance MANAGED_NODE_IPS="" -while [ -z "$MANAGED_NODE_IPS" ]; do +while [ -z "${MANAGED_NODE_IPS}" ]; do echo "Waiting for Manager IP address..." MANAGED_NODE_IPS=$(aws ec2 describe-instances \ --filters "Name=tag:Name,Values=AutoSD_Managed_Node" \ "Name=instance-state-name,Values=running" \ --query 'Reservations[*].Instances[*].PrivateDnsName' \ --output text \ - --region $AWS_REGION) + --region ${AWS_REGION}) sleep 5 done -MANAGED_NODE_IPS_LIST=$(echo $MANAGED_NODE_IPS | tr ' ' ',' | sed 's/,/,\n/g') +MANAGED_NODE_IPS_LIST=$(echo ${MANAGED_NODE_IPS} | tr ' ' ',' | sed 's/,/,\n/g') # mkdir -p /etc/bluechi/controller.conf.d # Add managed nodes to the controller configuration echo -e "[bluechi]\nManagerPort=2020\nAllowedNodeNames=$(hostname)," > /etc/bluechi/bluechi.conf.d/1.conf -for n in $(echo $MANAGED_NODE_IPS) +for n in $(echo ${MANAGED_NODE_IPS}) do echo -e " $n," >> /etc/bluechi/bluechi.conf.d/1.conf done