Reputation: 15141
I have a Berksfile
like this:
source "https://api.berkshelf.com"
cookbook 'ruby_build'
cookbook 'rbenv', github: 'fnichol/chef-rbenv'
cookbook 'foo', git: '[email protected]:ironsand/cookbook-foo.git'
After knife solo cook node
, Berksfile.lock
is created and lock the version of cookbooks.
I want to use latest cookbook for own cookbook(foo
), and lock the version for cookbook created by others(rbenv
,ruby_build
).
I couldn't find out how to do it. does anyone know can I do it?
Upvotes: 1
Views: 1077
Reputation: 4223
you can specify your cookbook versions in the Berksfile. Or, in the case of the cookbooks that you are giving a git repo for, you can specify the revision to pull.
source "https://api.berkshelf.com"
cookbook 'ruby_build', '= 4.0.2'
cookbook 'rbenv', github: 'fnichol/chef-rbenv', tag: 'some_Tag'
cookbook 'foo', git: '[email protected]:ironsand/cookbook-foo.git', :branch 'master'
you can also use :ref 'some_git_hash_for_ref'
at if you want a specific hash rather than a tag or branch.
Upvotes: 2