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:

WordPress.com Logo

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

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s