Templates

 

TOPICS

  • 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

ERB

  • 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

ERB Tags

<%

%>

=

node['tomcat']['user']

<% if    -----    %>

<% end   %>

Templates (deprecated)

By School of Devops

Templates (deprecated)

DEPRECATED CCI 08 - Chef CI Templates

  • 871