在节点run_list中指定确切的食谱版本仍然可行吗? [英] specify exact cookbook version in node run_list still possible?

查看:52
本文介绍了在节点run_list中指定确切的食谱版本仍然可行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在笔记中提到了 { run_list:[ recipe [nginx@1.2.3]]} 可以显式指定食谱版本来在节点run_list中使用,但我无法使它正常工作,也找不到任何文档说明该功能是否仍受支持或是否已弃用。

I have this in my notes that {"run_list":["recipe[nginx@1.2.3]"]} 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.

http://www.rubydoc.info/gems/chef/Chef/RunList/RunListItem

这篇关于在节点run_list中指定确切的食谱版本仍然可行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆