Files vs Templates
ERB
Tags
server.dev.xml
server.stg.xml
server.prod.xml
port=8081
port=8000
port=8080
server.xml.erb
port=<%= node['tomcat']['port'] %>
port=8000
Erubis / Embedded Ruby
Ruby based templating engine
Just in time processing
Contains tags to mark what needs to be processed
TOMCAT_CFG_LOADED="1"
JAVA_HOME="<%= node['tomcat']['java_home'] %>"
JAVA_OPTS="<%= node['tomcat']['java_opts'] %>"
CATALINA_BASE="/usr/share/tomcat"
CATALINA_HOME="/usr/share/tomcat"
JASPER_HOME="/usr/share/t
<%
%>
=
node['tomcat']['user']
<% if ----- %>
<% end %>