Writing Libraries for Chef
DevOps Training Architect II in Content
Within our Chef recipes, we often combine resources with pure Ruby logic to achieve our final configurations. The Ruby logic can sometimes make it difficult to see exactly what is going on in recipes, and this is where it makes sense to extract code out into Chef libraries. In this hands-on lab, we'll refactor an existing recipe by extracting logic into libraries, to improve the maintainability and readability. By the time we've finished this lab, you should feel more comfortable utilizing Chef libraries to write better Chef code.