Skip to content

Instantly share code, notes, and snippets.

@fernandoaleman
Last active October 1, 2018 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fernandoaleman/b83e7ed2bc8594fedc29736418b9c690 to your computer and use it in GitHub Desktop.
Save fernandoaleman/b83e7ed2bc8594fedc29736418b9c690 to your computer and use it in GitHub Desktop.
Updating Chef node

Problem

An existing chef node node-1 needs to be renamed node-01.

Solution

  1. knife node edit node-1
    • Change the node_name to node-01.
  2. knife node delete node-1
  3. knife client delete node-1
  4. knife client create -d node-01
    • Copy the newly created private key.
  5. Connect to the node-1 server as root.
  6. Paste the new private key into /etc/chef/client.pem.
  7. vim /etc/chef/client.rb
    • Add/edit node_name "node-01"
  8. Disconnect from the node-1 server.
  9. knife acl add group clients nodes 'node-05' update,read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment