我有Berksfile
这样:
source "https://api.berkshelf.com"
cookbook 'ruby_build'
cookbook 'rbenv', github: 'fnichol/chef-rbenv'
cookbook 'foo', git: 'git@bitbucket.org:ironsand/cookbook-foo.git'
knife solo cook node
之后,创建Berksfile.lock
并锁定烹饪书的版本。
我想将最新的食谱用于自己的食谱(foo
),并锁定其他人(rbenv
,ruby_build
)创建的食谱版本。
我无法理解如何做到这一点。有谁知道我能做到吗?
答案 0 :(得分:2)
您可以在Berksfile中指定您的食谱版本。或者,如果您正在为您提供git repo的烹饪书,您可以指定要提取的修订版。
source "https://api.berkshelf.com"
cookbook 'ruby_build', '= 4.0.2'
cookbook 'rbenv', github: 'fnichol/chef-rbenv', tag: 'some_Tag'
cookbook 'foo', git: 'git@bitbucket.org:ironsand/cookbook-foo.git', :branch 'master'
如果您想要特定的哈希而不是标签或分支,也可以使用:ref 'some_git_hash_for_ref'
。