Hi all,

Currently, we have a couple templates with local customizations to do 
things like pass on Kernel parameters, like this example from the 
`Kickstart default PXELinux` template.

   <%-# NOTE:
       # If host is VMware (If it uses the VMware provider), than pass 
kernel params to avoid ‘consistent network device naming’.
       # If host is not VMware, then assign a serial console for IPMI/SOL. 
Assuming standard Supermicro ttyS1 for now.
    <% if @host.provider == 'VMware' -%>
    <%-# I am a Virtual Machine -%>
    APPEND initrd=<%= @initrd %> ks=<%= foreman_url('provision')%> network 
ks.sendmac net.ifnames=0 biosdevname=0
    <% else -%>
    <%-# I am a Physical Machine -%>
    append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%> network 
ks.sendmac console=tty0 console=ttyS0,9600
    <% end -%>
    <% else -%>
    APPEND initrd=<%= @initrd %> ks=<%= foreman_url('provision')%> 
ksdevice=bootif network kssendmac
    <% end -%>

I noticed that newer versions of the `Kickstart default PXELinux` template 
have added an array named `<%= options %>` or `<%= pxe_kernel_options %>`, 
like so:
Foreman 1.13:

    <% elsif @host.operatingsystem.name == 'Fedora' and @host.
operatingsystem.major.to_i > 16 -%>
    APPEND initrd=<%= @initrd %> ks=<%= foreman_url('provision') %> 
ks.device=bootif network ks.sendmac <%= pxe_kernel_options %>

Foreman 1.12 and older:

    <% elsif @host.operatingsystem.name == 'Fedora' and @host.
operatingsystem.major.to_i > 16 -%>
    APPEND initrd=<%= @initrd %> ks=<%= foreman_url('provision')%> 
ks.device=bootif network ks.sendmac <%= options %> 

It looks like many of many customizations can be folded into one of these 
arrays, which would simplify our own templates and make it easier to keep 
them in sync with the upstream versions.

How could I make use of the <%= options %> or <%= pxe_kernel_options %> 
arrays? I can't find any documentation about them. Would I want to set 
parameters on a Host Group basis?


-= Stefan

You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to