Templating; Use Cases; Variables - Red Hat NETWORK SATELLITE 5.3.0 Deployment Manual

Hide thumbs Also See for RED HAT NETWORK SATELLITE 5.3.0:
Table of Contents

Advertisement

Chapter 5. Provisioning with Satellite

5.7. Templating

One of the more powerful new features in Satellite 5.3 is Cheetah based kickstart templating. With this
new capability, you can include variables, snippets (see below), and flow control statements such as
for loops and if statements in your kickstart files.

5.7.1. Use Cases

There are a variety of reasons a user may want to use templating, such as:
• You might want to reuse a particular section of a kickstart, such as a disk partitioning section,
between multiple kickstarts.
• If you have, for example, multiple kinds of server roles such as DNS server, proxy server, and web
server, all with their own package set. You could define a snippet for each role. For example web
server might have the following snippet defined:
httpd
mod_ssl
mod_python
If you want to create a web server profile, include the web server snippet in the %package section
of your Kickstart file. If you wanted a profile to be both a web server and a proxy server, you could
include both snippets in the package section. Then if you wanted to add another package to the
web server snippet, mod_perl for example, by updating the snippet all profiles that are using that
snippet would be updated as well.
• You might want to perform certain actions in %post consistently across multiple kickstarts.

5.7.2. Variables

Templating allows for variables such as foo to be defined, and the value of those variables replaced
wherever $foo is seen in a kickstart file.
Variables are subject to a form of inheritance that allows them to be set at one level and overridden at
levels below them — the hierarchy is defined by Cobbler:
• Kickstart tree (distro in cobbler) parameters come first
• Kickstart Profile parameters override kickstart tree parameters
• System parameters override Profile parameters
If a variable is defined at the system level, it will override the same variable defined at the Profile or
Distro levels. Likewise, if a variable is defined at the Profile level, it will override the same variable if
defined at the kickstart tree (distro) level.
Note
Note that kickstart tree (distro) variables cannot be defined for non-custom (automatically
generated) kickstart trees such as the ones you get when you do a satellite sync.
https://fedorahosted.org/cobbler/wiki/KickstartTemplating
Refer to
40
for more information.

Advertisement

Table of Contents
loading

Table of Contents