Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

e.g.

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

1 Answer 1

up vote 2 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

 
discard

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.