Reputation: 728
I have a recipe(say A), that includes a cookbook B, Also there is a recipe(say C) that includes this cookbook B again. Now if i make a recipe that includes both A and C in the order. What will happen is that cookbook B will run before A and A will do its job. Now C will now call cookbook B which has already run so it will not run, so C will do its job without calling B before.
But for C to work correctly , A should have done its job after calling B and then C should rerun cookbook B.
So how to rerun the cookbook B in C again.
Upvotes: 1
Views: 302
Reputation: 37600
This thinking kind of violates the desired state approach. Recipes aren't run multiple times.
Chef's custom resources or libraries allow help you to create reusable functionality that is then used in recipes.
Upvotes: 4