Project

General

Profile

TemplateWriting » History » Version 7

Justin Sherrill, 02/01/2011 04:00 PM

1 1 Justin Sherrill
h1. Templates
2
3
4
5 4 Justin Sherrill
The following functions and macros can be used within templates.  These are guaranteed to work via the safemode rendering, to ensure a template can do nothing harmful.  With safemode disabled ($$ADD instructions here$$), other macros may work, but are not supported at this time.
6 1 Justin Sherrill
7
8 2 Justin Sherrill
h2. Functions:
9 1 Justin Sherrill
10
|_.Name|_.Description|_.Example|
11
|root_pass  |The root password configured for the system| |
12
|ks_console | | |
13 7 Justin Sherrill
|snippets(name)   | Renders the specified snippet | |
14 6 Justin Sherrill
|foreman_url(kind)| Provides the full URL to a host-rendered template of the given kind  | foreman_url("provision") =>  http://HOST/unattended/provision |
15 1 Justin Sherrill
|@host                |The name of the host| |
16
|@host.name                |The name of the host| |
17
|@host.diskLayout     |The disklayout of the host (could come from the operating system)| |
18
|@host.puppetmaster   |The puppetmaster the host should use | |
19
|@host.architecture   |The arch of the host (i.e. x86_64)| |
20
|@host.operatingsystem|The operating system name| |
21
|@host.operatingsystem.media_url |||
22
|@host.operatingsystem.major |The major version of the OS||
23
|@host.operatingsystem.minor |The minor version of the OS||
24
|@host.operatingsystem.family |The OS Family (I.e. redhat, debian, etc.)||
25
|@host.url_for_boot(:kernel) |||
26
|@host.url_for_boot(:initrd) |||
27
28
29
30 2 Justin Sherrill
h2. Kickstart only variables:
31
32 1 Justin Sherrill
|_.Name|_.Description|_.Example|
33
|@dynamic |||
34
|@osver |||
35
|@arch |||
36
|@mediapath |||
37
|@epel |||
38
|@yumrepo |||
39
|@static |||
40
41 6 Justin Sherrill
h2. Preseed attributes:
42
43 1 Justin Sherrill
|_.Name|_.Description|_.Example|
44
|@preseed_path |||
45
|@preseed_server |||