Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

specify exact cookbook version in node run_list still possible?

I have this in my notes that {"run_list":["recipe[[email protected]]"]} is possible to explicitly specify a cookbook version to use in a nodes run_list but i can't get it to work and can't find any documentation to say if this is still supported or if it's been deprecated.

This is using chef 11.18.0. Can anyone confirm if this is still OK to use and where this should be configured. In the node run_list or role run_list ?

thanks

like image 312
Flo Woo Avatar asked Jan 29 '15 04:01

Flo Woo


People also ask

How do I run a cookbook in node JS?

You can assign the cookbook directly to a node by adding it to the node's run list. You can add a cookbook to the role and add the role to the node's run list. You can add the role to the run list of another role and add that other role to the node's run list. A cookbook can be a dependency of another used cookbook.

What is Runlist?

A Run List is a collection of one or more automation flows that are executed on one or more Schedules. The execution of a Run List is controlled by the LEAPWORK Controller.


1 Answers

You can specify a version of a cookbook exactly as you stated. The format is recipe[cookbook_name::recipe_name@cookbook_version]. You do not need to include the recipe_name (or the ::) if you're using the default recipe.

It works both in a role and in a runlist. You can specify it on command line when bootstrapping, add it to a node, etc.

http://www.rubydoc.info/gems/chef/Chef/RunList/RunListItem

like image 53
w25r Avatar answered Oct 22 '22 14:10

w25r