How do i add a dependency for my cookbook?



  • To make a cookbook dependent on another cookbook(s), In ~/chef-repo/cookbooks/your_cookbook/metadata.rb file.

    Add a line:

    depends 'web', '< 1.0'
    

    In this case your_cookbook, depends on having the web cookbook & version less than 1.0


Log in to reply
 

© Lightnetics 2024