Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify the version of Chef Solo in Test Kitchen .kitchen.yml file?

I am using Test Kitchen to test a cookbook. I would like to specify the version number of chef solo that will be installed. How can I specify a version number?

like image 206
Andrew Avatar asked Apr 30 '14 21:04

Andrew


People also ask

Where is kitchen yml located?

Finally, Test Kitchen also has several environment variables where you can set a path to a kitchen. yml or $HOME/. kitchen/config. yml file.

What is kitchen yml?

Defined in a kitchen. yml file. Uses a driver plugin architecture. Supports cookbook testing across many cloud providers and virtualization technologies. Supports all common testing frameworks that are used by the Ruby community.


2 Answers

Figured it out...In your .kitchen.yml file you have an option called require_chef_omnibus. You can specify true, latest, or a version number.

provisioner:
  name: chef_solo
  require_chef_omnibus: 11.10.4
like image 68
Andrew Avatar answered Sep 30 '22 18:09

Andrew


       **** require_chef_omnibus deprecated
The 'require_chef_omnibus' attribute with version values will change
to use the new 'product_version' attribute.

Note: 'product_name' must be set in order to use 'product_version'
until 'product_name' replaces 'require_chef_omnibus' as the default.

# New Usage #
provisioner:
  product_name: <chef or chefdk>
  product_version: 13.12.3
like image 31
Will Austin Avatar answered Sep 30 '22 18:09

Will Austin