As we have already discussed, recipes are fundamental units of cookbooks and contain step-by-step instructions to configure the machine.
Our goal is to install WordPress, PHP, and Apache2. There are some defined tasks when we install any Linux distribution. The most common task is to update the packages of an operating system. An
apt cookbook provides us with the facility to update packages automatically. We will include an
apt cookbook to ensure that all the packages are updated.
metadata.rb file in
wpblog and add the following dependencies:
depends 'rvm' depends 'apt' depends 'apache2' depends 'php' depends 'mysql'
Let's include the
apache2 recipes in our
wpblog recipe and provision the machine.