简体   繁体   中英

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] .

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] .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM