Best practices when writing recipes
As with any coding practice, there are some good practices that, when adopted, lead to better code quality:
Don't repeat yourself. This is especially important because generally system administrators have the habit of working in silos. Every other system administrator feels some sense of pride in having a repository full of tools of trade that he/she has written himself/herself. Now, there is nothing wrong with that; however, almost 95 percent of tools are rewrites. Avoid doing so with your recipes. Reusability is a wonderful concept and rather than wasting time in writing recipes from scratch, make use of recipes that are already available within the community. If you are really feeling the itch, write a wrapper, work with the community to improve features in a cookbook, or extend the available set of cookbooks by writing recipes for things for which there isn't any cookbook currently available.
Don't feel stupid when using the include_recipe method. It...