SUSE Manager/NewFeatures2.1/AutoinstallationTemplates

From MicroFocusInternationalWiki
Jump to: navigation, search

Autoinstallation templates

Automatic escaping of the $ symbol from the autoinstallation templates has been discontinued in SUSE Manager 2.1.

The autoinstallation template has syntax rules, using punctuation symbols. To avoid clashes, they need to be properly treated.

In case the autoinstallation scenario contains any shell script using variables like $(example) its content should be escaped by using the backslash symbol:

 This is an \$(example) content.

If variable named "example" is defined in the autoinstallation snippet, the templating engine will evaluate "$example" with its content. If there is no such variable, the content will be left unchanged. Escaping the $ symbol will prevent the templating engine to perform its evaluation as an internal variable.

Long scripts or strings can be escaped by wrapping them with the #raw and #end raw directives. For example:

 for i in {0..2}; do
   echo "$i - Hello World!"
 #end raw

An additional attention needs to be paid to the similar scenarios:

 #start some section (this is a comment)
 echo "Hello, world!"
 #end some section (this is a comment)

Any line which has a # symbol followed by a whitespace is treated as a comment and is not evaluated.