0

Is it possible to upload an exact version of a Chef cookbook via knife? All I've seen is that knife will upload the latest version it can find.

Is it possible to upload a specific version? Downloading examples show:

$ knife cookbook download COOKBOOK_NAME [COOKBOOK_VERSION] (options)

Is there a way to do this with the upload command?

2
  • You set the version in metadata.rb. See docs.chef.io/config_rb_metadata.html Feb 18, 2016 at 1:26
  • I actually have multiple versions of a single cookbook that do have different metadata versions, I was just hoping to upload a specific version I have that could be in one of my cookbook_path directories from knife.
    – Stefhen
    Feb 18, 2016 at 15:00

1 Answer 1

1

Knife upload te version of code you have on your disk, on the corresponding cookbook-dir inside your cookbooks path, that is configured on your knife.rb

That being said, if you use tags on your cookbooks, you can use git to do checkouts and switch to the desired version. Then invoke the:

knife upload COOKBOOK_NAME

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .