且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在.kitchen.yml文件中指定食谱路径?

更新时间:2023-09-26 11:05:40

您需要将路径放入berks文件中,

You'll want to put the path in your berksfile, which will likely end up looking like so..

source 'https://supermarket.chef.io'
cookbook 'cookbookname', path: 'relative/or/absolute/path/to/cookbook/directory'

厨师在部署代码时也会使用berksfile,因此如果您的相对文件结构与厨师服务器上的机器上的相对文件结构相同(即所有食谱共享一个目录,以便您的berksfile可以使用路径'../ cookbookname')

The berksfile is also used by chef when you deploy your code so it helps if your relative file structure is the same on your machine as it is on your chef server (i.e. all cookbooks share a directory so your berksfile can use the path '../cookbookname')