Skip to content

Instantly share code, notes, and snippets.

@MaxAnderson95
Last active May 22, 2023 18:18
Show Gist options
  • Save MaxAnderson95/bfa74f65c4295dbd889b7137cb6ee877 to your computer and use it in GitHub Desktop.
Save MaxAnderson95/bfa74f65c4295dbd889b7137cb6ee877 to your computer and use it in GitHub Desktop.
Set proper hostname for Rancher-launched RKE2 clusters
#cloud-config
# Requires that the node template used has the jq utility installed.
runcmd:
- 'hostnamectl set-hostname $(cloud-init query -a | jq -r .v1.local_hostname)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment