Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating a run list in chef using knife

I have cookbook which contains a list of recipes. What is the command to add some specific recipes (not all) from cookbook using command line tool in chef knife?

I know the command to add the whole cookbook to run list which is knife node run_list add server name recipe[cookbook name].

like image 414
Anirudh Singh Avatar asked Oct 18 '14 18:10

Anirudh Singh


1 Answers

So you have the right idea, knife node run_list add $nodename $item is the command you want.

recipe[mycookbook] doesn't add "the whole cookbook", instead that is just a shorthand for recipe[mycookbook::default], which in turn maps to mycookbook/recipes/default.rb. Similarly if you have mycookbook/recipes/foo.rb that would be recipe[mycookbook::foo].

like image 128
coderanger Avatar answered Oct 12 '22 14:10

coderanger