问题描述
我在笔记中提到了 { run_list:[ recipe [[email protected]]]}
可以显式指定食谱版本来在节点run_list中使用,但我无法使它正常工作,也找不到任何文档说明该功能是否仍受支持或是否已弃用。
I have this in my notes that {"run_list":["recipe[[email protected]]"]}
is possible to explicitly specify a cookbook version to use in a nodes run_list but i can't get it to work and can't find any documentation to say if this is still supported or if it's been deprecated.
这是使用厨师11.18.0。任何人都可以确认这是否仍然可以使用以及应在何处进行配置。在节点run_list或角色run_list中?
This is using chef 11.18.0. Can anyone confirm if this is still OK to use and where this should be configured. In the node run_list or role run_list ?
感谢
推荐答案
您可以完全按照您的说明指定食谱的版本。格式为 recipe [cookbook_name :: recipe_name @ cookbook_version]
。如果您使用的是默认食谱,则无需添加食谱名称(或:::)。
You can specify a version of a cookbook exactly as you stated. The format is recipe[cookbook_name::recipe_name@cookbook_version]
. You do not need to include the recipe_name (or the ::) if you're using the default recipe.
它既可以在角色中使用,也可以在运行列表中使用。您可以在引导时在命令行上指定它,将其添加到节点等。
It works both in a role and in a runlist. You can specify it on command line when bootstrapping, add it to a node, etc.
这篇关于在节点run_list中指定确切的食谱版本仍然可行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!