Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to attributes from knife command (ssh),


knife ssh ‘role:server’ ‘sudo chef-client’ <-- how to pass attributes to remote?
share|improve this question
Can't this be done through the "-j" option for chef-client? – cjc Nov 12 '12 at 17:08
up vote 3 down vote accepted

You should set the attributes you want on the node object(s) on the Chef Server.

You can do this through a variety of methods.

  • Add the attributes to the role you've applied to the nodes - this probably the best for systems that are all in a single role.
  • Modify the node(s) directly, with knife node edit, or script it with knife exec.
  • Set the attributes in an environment, if you're using those.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.