Creating a Template for Chef Cookbook 1


In the last article, we discussed about Install Knife-azure Plugin

In this article we will create a template that will be used by a cookbook.

As we mentioned previously, we need to generate a template file which will be used as default.html page.
First of all we will execute the following command to generate the template:
chef generate template webserver Default.htm

48.1 webserver template
Open Default.htm.erb and modify it.
48.2 webserver template-html
Upload the cookbook to Chef server by using knife cookbook upload webserver
48.3 webserver cookbook upload(1)
Now we are ready to use the template in the recipe of cookbook.

In the Next article we will discuss about Creating Cookbook


Leave a comment

Your email address will not be published. Required fields are marked *

One thought on “Creating a Template for Chef Cookbook