Bootstrap Chef Node with Knife

Another frequently used command that is easy to forget where the documentation isn’t current.

knife bootstrap <server> -U <username> -P <password> --sudo

As of 2022-01-08, we need to make another update. We must now specify as node name. Who knows why it can’t be inferred. We must also explicitly tell Chef to reuse the password to elevate privileges, which it could also infer.

knife bootstrap <server> -U <username> -N <node> --sudo -P <password> --use-sudo-password

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s