Correction, I can't use this is the PXELinux templates...
default linux
label linux
kernel <%= @kernel %>
append initrd=<%= @initrd %> ks=<%= foreman_url("provision")%> ksdevice=eth0 network kssendmac ip=<%= ip %> netmask=<%= subnet[:mask] %> gateway=<%= subnet[:gateway] %> dns=<%= subnet[:dns_primary] %>
I can however use the following
default linux
label linux
kernel <%= @kernel %>
append initrd=<%= @initrd %> ks=<%= foreman_url("provision")%> ksdevice=eth0 network kssendmac ip=<%= ip %> netmask=<%= @host.subnet.mask %> gateway=<%= @host.subnet.gateway %> dns=<%= @host.subnet.dns_primary %>
The error I get when using the first attempt is this (hostnames/ip changed)
Processing HostsController#update (for ...... at 2012-01-05 10:19:27) [PUT]
Parameters: {"commit"=>"Submit", "action"=>"update", "_method"=>"put", "authenticity_token"=>"FV/8/chFOEddPnsMHlK7O3jxmASVvSfHXlp1BlGAPiY=", "id"=>"client.tamu.edu", "controller"=>"hosts", "host"=>{"architecture_id"=>"1", "subnet_id"=>"2", "puppetproxy_id"=>"1", "name"=>"client", "sp_mac"=>"", "sp_name"=>"", "managed"=>"1", "puppetmaster_name"=>"puppetca.tamu.edu", "root_pass"=>"[FILTERED]", "hostgroup_id"=>"1", "mac"=>"52:.....", "domain_id"=>"1", "enabled"=>"1", "medium_id"=>"6", "ptable_id"=>"9", "disk"=>"", "ip"=>"........", "puppetclass_ids"=>["", "6", "7", "29", "125", "180", "172", "89", "96"], "environment_id"=>"1", "comment"=>"", "sp_subnet_id"=>"", "sp_ip"=>"", "model_id"=>"5", "operatingsystem_id"=>"7"}}
Add the TFTP configuration for client.tamu.edu
Failed to generate PXELinux template: undefined method `subnet' for nil:NilClass
Fetching required TFTP boot files for client.tamu.edu
Rolling back due to a problem:
Delete the TFTP configuration for client.tamu.edu
Failed to save: Failed to generate PXELinux template: undefined method `subnet' for nil:NilClass
Rendering template within layouts/application
Rendering hosts/edit
Completed in 1098ms (View: 969, DB: 189) | 200 OK [https://foreman.tamu.edu/hosts/client.tamu.edu]
I will get back in a day or two if I found out how to fix...I don't see how it works in Kickstart but not PXELinux as they are all "config_templates".