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

2

8

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?

Reneerenegade answered 30/4, 2014 at 21:56 Comment(0)
R
16

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
Reneerenegade answered 30/4, 2014 at 22:10 Comment(1)
The documentation at docs.chef.io/config_yml_kitchen.html doesn't mention the option latest. But it works as described here.Young
A
2
       **** 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
Adair answered 17/12, 2018 at 23:32 Comment(1)
Don't forget to set product_name when using it else this option will be silently ignored.Handout

© 2022 - 2024 — McMap. All rights reserved.