Sha256: 190c2ac317a5d8106a3d6aa9a5d4e5a41b92172eb17545ee1de434e5373d9ed0
Contents?: true
Size: 830 Bytes
Versions: 4
Compression:
Stored size: 830 Bytes
Contents
#!ipxe # Example foreman_bootdisk generic host template # # This template is generic, but it will chainload to Foreman so expects the # host to be registered already. # # It loops through all interfaces using DHCP, requesting a template from # Foreman in the hope that one of the MACs or IPs matches. # # Copy this template to customize it, the original is read-only. # loop over net* until we can get a template <% (0..32).each do |i| -%> :net<%= i %> isset ${net<%= i -%>/mac} || goto no_nic echo net<%= i -%> is a ${net<%= i -%>/chip} with MAC ${net<%= i -%>/mac} dhcp net<%= i %> || goto net<%= i+1 %> chain <%= (u = URI.parse(foreman_url("gPXE")); u.query = "#{u.query}&mac="; u.to_s) %>${net<%= i -%>/mac} || goto net<%= i+1 %> exit 0 <% end -%> :no_nic echo Failed to chainload from any network interface sleep 30 exit 1
Version data entries
4 entries across 4 versions & 1 rubygems