Organize code in Chef: libraries, classes and resources
- by ColOfAbRiX
I am new to both Chef and Ruby and I am implementing some scripts to learn them. Now I am facing the problem of how to organize my code: I have created a class in the library directory and I have used a custom namespace to maintain order. This is a simplified example of my file:
# ~/chef-repo/cookbooks/mytest/libraries/MyTools.rb
module…