Snippets - 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

Snippets

5.7.3. Snippets
Snippets are similar to variables but can span many lines and can include variables in them. They can
be included in a kickstart profile by using the text $SNIPPET('snippet_name'). You may make a
snippet for a certain package list, one for a particular %post script, or for any text that would normally
be included in a kickstart file.
The main purpose of snippets are to be able to reuse pieces of code between multiple kickstart
templates and thus make each template easy to understand.
To manage snippets navigate to the Systems => Kickstart => Kickstart Snippets page. From here
you can see Default Snippets that may not be edited, but may be used by any organization. These
default snippets are provided to help make large tasks easier. For an explanation of common default
snippets see the Default Snippet section below. From this page you may also view Snippets created
just for your organization on the Custom Snippets tab. You may also create a custom Snippet by
clicking on the create new snippet link. Note, default snippets are stored on the Satellite server's
file system in /var/lib/cobbler/snippets/ while custom snippets are stored in the /var/
lib/rhn/kickstarts/snippets/ directory. Since Satellite stores its snippets for different orgs in
different directories, any custom snippets will be used like the following:
$SNIPPET('spacewalk/1/snippet_name')
The 1 in this case is the organization id. If you are not sure what text to insert in the kickstart in order
to use your custom snippet, look for the Snippet Macro column on the snippet list, or on the snippet
details page.
Snippets exist at a global level and do not share the same inheritance structure as variables. You
may use variables within the snippets to change the way they behave depending on which system is
requesting the kickstart.
41

Advertisement

Table of Contents
loading

Table of Contents