How can I run a cookbook with a specific version using chef-client?

24,020

Found the answer with some hit and try

Ran following command

chef-client -o "recipe[[email protected]]"

This will call mycookbook version 0.1.1

NOTE: Running chef-client with the -o parameter will permanently override the runlist for that node.

Share:
24,020
Salim
Author by

Salim

Enthusiastic learner interested in Big data eco system administration, Chef, Jenkins, Bash scripting,Linux system administration, Dev Ops

Updated on July 26, 2022

Comments

  • Salim
    Salim almost 2 years

    I am having 2 cookbooks name as mycookbook and version 0.1.0 and 0.1.1 on chef server. Now I want to run only cookbook mycookbook version 0.1.1 using chef-client. How do I do this ?