Skip to content

Commit

Permalink
Merge pull request #88 from ghsbhatia/fix-ubuntu-hostname
Browse files Browse the repository at this point in the history
fix ubuntu hostname
  • Loading branch information
mddamato authored Jul 6, 2023
2 parents c40e44a + 8d434b3 commit 0b3def5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/common/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ do_download() {
# TODO: Determine minimum supported version, for now just carry on assuming ignorance
apt update -y
apt install -y unzip less iptables resolvconf linux-headers-$(uname -r) telnet
hostnamectl set-hostname "$(curl http://169.254.169.254/latest/meta-data/hostname)"

TOKEN=$(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
HOSTNAME=$(curl -s -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/hostname)
hostnamectl set-hostname $HOSTNAME

INSTALL_RKE2_METHOD='tar' INSTALL_RKE2_TYPE="${type}" ./install.sh

Expand Down

0 comments on commit 0b3def5

Please sign in to comment.