Chef Intro repository
In this repository we solve some very basic tasks, it helps you practice Chef. Check the commit history to see the steps separately:
- Create a basic recipe that installs apache2. We create new apache cookbook, that only has a package resource in the default recipe, we create a new webserver role that we add to the
run_list
of the node. - Use attributes. We specify default attributes in the cookbook, create a simple template that uses these attributes and override attributes in the role.
- Create a recipe that create a virtualhost named example.com. We create a directory and the virtualhost configuration from a template.
- Modify the previous recipe to go through all the items in a data bag and creates vhosts based on the data there.