Reputation: 3641
I am using AWS Opsworks and have a stack of Chef 12.0 .. Question since in Chef 12 cookbook dependency is not supported.. I managed to create a cookbook that install my webserver and deploy an APP .. to support 2 APP in different stack they have different cookbook but has a common file which is installing the webserver (/recipes/webserver.rb) , is there a method that the cookbooks can just inherit/call a common file? Coz I don't want that if there are changes in the webserver recipe I have to update two cookbooks.
Thanks in advance
Upvotes: 1
Views: 218
Reputation: 54267
You can use include_recipe
to include one recipe in another. You also might want to look in to putting the common logic in a custom resource and using that in both application recipes. Check out https://github.com/poise/application_examples/ for some examples of resource-driven application deployment.
Upvotes: 1