From 18fb5a1fe0c1bc02192f57fb5056e171a7f06c38 Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Sat, 18 Mar 2023 11:14:36 -0400 Subject: [PATCH] Move code block farther down. --- deployment/remote.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/deployment/remote.sh b/deployment/remote.sh index cf8960b..5e10544 100755 --- a/deployment/remote.sh +++ b/deployment/remote.sh @@ -116,12 +116,6 @@ if [ "$DISK_TO_USE" != loop ]; then fi fi -# The MGMT Plane IP is the IP address that the LXD API binds to, which happens -# to be the same as whichever SSH connection you're coming in on. -MGMT_PLANE_IP="$(ssh ubuntu@"$FQDN" env | grep SSH_CONNECTION | cut -d " " -f 3)" -IP_OF_MGMT_MACHINE="$(ssh ubuntu@"$FQDN" env | grep SSH_CLIENT | cut -d " " -f 1 )" -IP_OF_MGMT_MACHINE="${IP_OF_MGMT_MACHINE#*=}" -IP_OF_MGMT_MACHINE="$(echo "$IP_OF_MGMT_MACHINE" | cut -d: -f1)" # error out if the remote password is unset. if [ -z "$LXD_REMOTE_PASSWORD" ]; then @@ -167,6 +161,11 @@ fi export DATA_PLANE_MACVLAN_INTERFACE="$DATA_PLANE_MACVLAN_INTERFACE" +MGMT_PLANE_IP="$(ssh ubuntu@"$FQDN" env | grep SSH_CONNECTION | cut -d " " -f 3)" +IP_OF_MGMT_MACHINE="$(ssh ubuntu@"$FQDN" env | grep SSH_CLIENT | cut -d " " -f 1 )" +IP_OF_MGMT_MACHINE="${IP_OF_MGMT_MACHINE#*=}" +IP_OF_MGMT_MACHINE="$(echo "$IP_OF_MGMT_MACHINE" | cut -d: -f1)" + # run lxd init on the remote server. cat <