Skip to content

Commit e66d874

Browse files
committed
Fix to export INSTANCE and CLUSTER_NAME
1 parent 648e3f6 commit e66d874

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

workshop/aws/ec2/templates/userdata.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,13 @@ write_files:
6262
echo "Your instance is ready!";
6363
fi
6464
65-
if [ -e /etc/.instance ]; then
66-
INSTANCE=$(cat /etc/.instance)
67-
CLUSTER_NAME="$INSTANCE-cluster"
68-
fi
65+
INSTANCE=$(cat /etc/hostname)
66+
CLUSTER_NAME="$INSTANCE-cluster"
67+
68+
#if [ -e /etc/.instance ]; then
69+
# INSTANCE=$(cat /etc/.instance)
70+
# CLUSTER_NAME="$INSTANCE-cluster"
71+
#fi
6972
export INSTANCE CLUSTER_NAME
7073
7174
%{ if presetup == true ~}

0 commit comments

Comments
 (0)