简体   繁体   English

使用knife更新chef中的运行列表

[英]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 ? 使用厨师knife命令行工具从cookbook添加一些特定食谱(不是全部)的命令是什么?

I know the command to add the whole cookbook to run list which is knife node run_list add server name recipe[cookbook name] . 我知道将整个cookbook添加到运行列表的命令,这是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. 所以你有正确的想法, knife node run_list add $nodename $item是你想要的命令。

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 . recipe[mycookbook]不添加“整本食谱”,而只是recipe[mycookbook::default]的简写,反过来映射到mycookbook/recipes/default.rb Similarly if you have mycookbook/recipes/foo.rb that would be recipe[mycookbook::foo] . 同样,如果你有mycookbook/recipes/foo.rb那将是recipe[mycookbook::foo]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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