https://rancher.com/ logo
Title
h

handsome-tiger-45123

03/29/2023, 1:28 PM
Hello, I'd like to install rke2 using ansible. How can I create a token to be used by ansible playbooks? Does it have to follow some rules, or a simple string is enough?
h

hundreds-evening-84071

03/29/2023, 1:39 PM
I have used this at some point in past:
echo $RANDOM | sha512sum | head -c 128; echo
Then insert it in the config.yaml You can change 128 to 64 if you don't fancy the long token...
Assuming this is what you are asking - or maybe I misunderstood
h

handsome-tiger-45123

03/29/2023, 1:40 PM
Yes, that was it. Thanks!
👍 1
r

rough-farmer-49135

03/29/2023, 1:55 PM
I often use the
apg
tool (stands for Automatic Password Generator) as I think it's in Debian/Ubuntu & RHEL repos and it gives you the fine grained control you may want for choosing.