Host to request a specific Provisioning Template

Problem:
In our environment, ESXi can be installed to 2 boot targets - SD Card or M.2. A system can have both devices. The user has to specify the target. To solve this we have created 2 separate provisioning templates - ESXi on SD and ESXi on BOSS. Then we create boot target specific OS entries for each ESXi build, set the appropriate template as default and associate that entry with the host:

ESXi 6.0 Build 01 on SD
ESXI6.0 Build 01 on BOSS
ESXI6.0 Build 02 on SD
ESXI6.0 Build 02 on BOSS
ESXI6.5 Build 01 on SD
ESXI6.5 Build 02 on BOSS
… and so on

This has resulted in over 200 OS entries already!

Expected outcome:
The kickstart file location for ESXi is specifed as a kernel parameter (or through boot.cfg) like this:
kernelopt=ks=http://${foreman_server_ip}/unattended/provision

Is it possible to directly link to the provisioning template here. For e.g, if the boot target is SD Card, I would like to pass something like:
kernelopt=ks=http://${foreman_server_ip}/unattended/provision/ESXi_on_SD

Is this possible at all or is there a better way to do it?

1 Like

Hello,

Your use case matches to hostgroup based provisioning, there is good video about same, request to check that,

I see no reason why not to allow carrying over parameters from request to template generation. I’d rather stick with /unattended/provision?param=value. Those could be exposed via some helper method like url_param(name). This is doable patch I think.

1 Like

Is there a way to submit a feature request for this?

Our issue tracker with “Feature” item would be the best.

https://projects.theforeman.org/projects/foreman/issues/new

And a PR is the best then :slight_smile: