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.

I'm using chef's knife to create EC2 servers (and thus new nodes). I can get it to start with a given single role correctly, but I can't get the command line argument right for multiple roles in the node's run_list. How do I specify multiple roles for the newly created node in the command line (without editing the node JSON in an editor as shown here)?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

I posted this question on the Opscode support site and received a very prompt response. Quoting from the Opscode support thread:

for chef 0.9.x:

knife ec2 server create ... 'role[foo]' 'role[bar]' 'role[baz]'

for chef 0.10.x:

knife ec2 server create ... -r 'role[foo], role[bar], role[baz]'

Works great, thanks Stephen!

share|improve this answer
add comment

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.