app/views/foreman/unattended/kickstart-katello-atomic.erb in katello-3.3.0.rc1.1 vs app/views/foreman/unattended/kickstart-katello-atomic.erb in katello-3.3.0.rc2
- old
+ new
@@ -5,10 +5,19 @@
lang <%= @host.params['lang'] || 'en_US.UTF-8' %>
keyboard <%= @host.params['keyboard'] || 'us' %>
timezone --utc <%= @host.params['time-zone'] || 'UTC' %>
+<% subnet = @host.subnet -%>
+<% if subnet.respond_to?(:dhcp_boot_mode?) -%>
+<% dhcp = subnet.dhcp_boot_mode? && !@static -%>
+<% else -%>
+<% dhcp = !@static -%>
+<% end -%>
+
+network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select(&:present?).join(',')}" %> --hostname <%= @host %><%= " --device=#{@host.mac}" -%>
+
# Partition table should create /boot and a volume atomicos
<% if @dynamic -%>
%include /tmp/diskpart.cfg
<% else -%>
<%= @host.diskLayout %>
@@ -32,10 +41,10 @@
%post
<%= snippet "subscription_manager_registration" %>
<%= snippet('remote_execution_ssh_keys') %>
(
# Report success back to Foreman
-curl -s -o /dev/null --insecure <%= foreman_url %>
+curl -s -o /dev/null --insecure <%= foreman_url('built') %>
) 2>&1 | tee /mnt/sysimage/root/install.post.log
exit 0
%end