如何从厨师食谱中访问元数据 "source_url"?
How to access metadata "source_url" from a chef recip?
我希望能够包含我的 Chef 存储库 metadata.rb
文件中的 source_url
属性,但我不知道如何从 Chef 食谱中访问此信息。
有没有人以前做过,能告诉我怎么做吗?
The contents of the metadata.rb file provides information that helps Chef Infra Client and Server correctly deploy cookbooks to each node.
据我所知,在 chef-client 运行.
期间无法(至少不是直接的)访问 metadata.rb
但是...在 chef-client 运行 期间,食谱正在同步并本地存储在节点的文件系统中。这意味着您可以实现一种机制来读取食谱中的 metadata.rb
文件(但我不建议这样做,我肯定会建议您使用以下值设置节点属性(或数据包项)( s) 你在 chef-client 期间需要的 运行)
我希望能够包含我的 Chef 存储库 metadata.rb
文件中的 source_url
属性,但我不知道如何从 Chef 食谱中访问此信息。
有没有人以前做过,能告诉我怎么做吗?
The contents of the metadata.rb file provides information that helps Chef Infra Client and Server correctly deploy cookbooks to each node.
据我所知,在 chef-client 运行.
期间无法(至少不是直接的)访问metadata.rb
但是...在 chef-client 运行 期间,食谱正在同步并本地存储在节点的文件系统中。这意味着您可以实现一种机制来读取食谱中的 metadata.rb
文件(但我不建议这样做,我肯定会建议您使用以下值设置节点属性(或数据包项)( s) 你在 chef-client 期间需要的 运行)