2

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)?

3

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!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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