A cookbook template is going to be an Embedded Ruby (ERB) template that is used to generate files for us. These templates are going to be great ways to insert Ruby expressions and statements into a native file format.
Example of inclusion:
template /var/www/index.html do
source 'index.html.erb'
end
These are comparable to Jinja2 template files in Ansible where the Ruby content is inserted in a specific ERB tags.Example of ERB file template:
<% if (25+25) == 100 %>
25 + 25 = <%= 25+25 %>
<% else %>
Wrong math
<% end %>