Accessing network information from a template


I would like to auto populate this kickstart line with the information foreman already knows about the host's network.

How do I get the subnet's netmask, gateway, nameservers to appear in the template? Currently I don't think the subnet class supports dns servers and gateway but it could easily be added.

network --addvmportgroup=true --device=vmnic0 --vlanid=227 --bootproto=static --ip=<%= @host.ip %>
–netmask= --gateway=10.0.x.x --nameserver=10.0.x.1,10.0.x.2 --hostname=<%= %>

Can I do something like @host.subnet.netmask?

Corey Osman

Green I.T and Datacenter Automation Specialist