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

Ophir Radnitz
  • 343
  • 2
  • 10

1 Answers1

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!

Ophir Radnitz
  • 343
  • 2
  • 10