Le 2014-10-30 12:21, Varun Shankar a écrit :
Usually, the second is a bad idea after a while, when you'll have a tree of if/else with a 5 or 6 levels deep which become unmaintanable. Second reason to avoid it: suppose you wish to make a change to some parameter on web-1, then another parameter change on web-2 has to be done (security fix for exemple) , you'll have two independent changes in the same cookbook. You probably don't wish to push both in production at the same time. So you'll have a third change reverting the one not urgent before promoting to production, with time it becomes a mess and a nightmare to follow and ensure you psuh in production exactly what you expect.
Having things in different places (cookbooks) helps you promote one with its own changes without needing to pull other unwanted/unexepected changes.
Hope it helps understanding why the wrapper cookbook pattern is the recomended choice. |
Archive powered by MHonArc 2.6.16.