Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
请帮助我在厨师客户端运行期间提取食谱名称和版本的食谱。我想将值存储到变量中并用作我的食谱的一部分。
我发现在节点上运行厨师客户端期间如何从食谱中提取食谱版本和名称有困难。
提前致谢。
cookbook_name您可以通过变量访问当前食谱的名称。
cookbook_name
可以通过以下方式检索本食谱(和其他食谱)的版本run_context:
run_context
run_context.cookbook_collection[cookbook_name].version