Edison now has basic support for templating in kickstart/FAI files:
Using the templates
- http://edison/api/kickstart/ – returns the value from the AutoInstallFile field on the Configuration Item Profile when sent the X-RHN-Provisioning-Mac-0 header
The kickstart output is based upon the value in the ConfigurationItemProfile.AutoInstallFile field. There is now support for rudimentary templating:
<<hostname>> is replaced by the value of ConfigurationItem.Hostname for the MacAddress sent
<<tree>> is replaced by http://<EDISON_SERVER>/cmdb/installtree/<ConfigurationItem.Hostname>/ - this will enable you to configure an install tree based upon the host or profile
<<rootpw>> is replaced by the value of rootpwhash as set on the configuration item
<<bootdev>> is replaced by the macaddress used to request the kickstart
As an example, if you were to put a line in the AutoInstallFile field as follows:
# Network information hostname = <<hostname>>
then with a host called laptop.local.domain, you would get the following in your kickstart file:
hostname = laptop.local.domain
Next step – making the install tree work correctly!
We’re nearly there… 🙂