Cobbler Templates20111.5. Cobbler TemplatesWithin the RHN Satellite web interface, there are facilities to create variables for use with kickstartdistributions and profiles. For example, to create a kickstart profile variable, refer to Section 7.4.9.3.3,“Kickstart Details Variables”.Kickstart variables are a part of an infrastructural change in Satellite to support templating in kickstartfiles. In the context of kickstart files, templates are files that hold descriptions used to build actualkickstart files, rather than creating specific kickstarts.These templates are then shared by various profiles and systems that have their own variables andcorresponding values. These variables modify the templates and software called a template engineparses the template and variable data into a usable kickstart file. Cobbler uses an advanced templateengine called Cheetah that provides support for templates, variables, and snippets.Advantages of using templates include:• Robust features that allow administrators to create and manage large amounts of profiles orsystems without duplication of effort or manually creating kickstarts for every unique situation• While templates can become complex and involve loops, conditionals and other enhanced featuresand syntax, it can also be used simply to make kickstart files without such complexity.11.5.1. Using TemplatesKickstart templates can have static values for certain common items such as PXE image filenames,subnet addresses, and common paths such as /etc/sysconfig/network-scripts/. However,where templates differ from standard kickstart files are in their use of variables.For example, a standard kickstart file may have a networking passage that looks similar to thefollowingnetwork --device=eth0 --bootproto=static --ip=192.168.100.24 --netmask=255.255.255.0 --gateway=192.168.100.1 --nameserver=192.168.100.2However, in a kickstart template file, the networking passage may look similar to the following:network --device=$net_dev --bootproto=static --ip=$ip_addr --netmask=255.255.255.0 --gateway=$my_gateway --nameserver=$my_nameserverThese variables will be substituted with the values set in your kickstart profile variables or in yoursystem detail variables. If there are the same variables defined in both the profile and the systemdetail, then the system variable takes precedence.For more information about kickstart templates, refer to the Cobbler project page at the following URL:https://fedorahosted.org/cobbler/wiki/KickstartTemplating11.5.2. Kickstart SnippetsIf you have common configurations that are the same across all kickstart templates and profiles, youcan utilize the Snippets feature of Cobbler to take advantage of code reuse.