specify exact cookbook version in node run_list still possible?

让人想犯罪 __ 提交于 2019-12-21 03:30:31

问题


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.

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 ?

thanks


回答1:


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



来源:https://stackoverflow.com/questions/28206866/specify-exact-cookbook-version-in-node-run-list-still-possible

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!