Explain these Chef-client, Run List and Include_recipe


• We run chef-client to apply the recipe to bring node into desired state.
• We call this process as “Convergence”

Run List

• Run the recipes in a sequence order that we mention in the Run list
• To apply each recipe from each cookbook (not multiple recipes from the same cookbook) at a time by
using chef-client (be in cookbooks folder to run the below command)

• sudo chef-client -z -r “recipe[cookbook_name::recipe_name]”
• sudo chef-client -zr “recipe[cookbook_name::recipe_name],recipe[cookbook_name::recipe_name]”


• To call recipe/recipes from another recipe within the same cookbook
• To run multiple recipes from the same cookbook
• Here comes the default recipe into action(can use any recipe).
– Add below line in the default.rb

• include_recipe “cookbook::recipe”        

• Now run(Be inside cookbooks folder)

• sudo chef-client -zr “recipe[cookbook_name::recipe_name]”  

Leave a Reply

Your email address will not be published. Required fields are marked *