<%= provisioner_wizard 3 %>

<%= _("All of the necessary network information has been collected, now run the Foreman installer again with the necessary arguments to configure provisioning.") %>

<%= _("Install provisioning with DHCP") %>

foreman-installer \
  --enable-foreman-proxy \
  --foreman-proxy-tftp=true \
  --foreman-proxy-tftp-servername=<%= provisioner.provision_interface_data[:ip] %> \
  --foreman-proxy-dhcp=true \
  --foreman-proxy-dhcp-interface=<%= provisioner.provision_interface %> \
  --foreman-proxy-dhcp-gateway=<%= provisioner.subnet.gateway %> \
  --foreman-proxy-dhcp-range="<%= provisioner.subnet.from %> <%= provisioner.subnet.to %>" \
  --foreman-proxy-dhcp-nameservers="<%= provisioner.subnet.dns_primary %><%= ("," + provisioner.subnet.dns_secondary) unless provisioner.subnet.dns_secondary.blank? %>" \
  --foreman-proxy-dns=true \
  --foreman-proxy-dns-interface=<%= provisioner.provision_interface %> \
  --foreman-proxy-dns-zone=<%= provisioner.domain.name %> \
  --foreman-proxy-dns-reverse=<%= provisioner.rdns_zone %> \
<%= provisioner.dns_forwarders.map { |f| "  --foreman-proxy-dns-forwarders=#{f} \\" }.join("\n") %>
  --foreman-proxy-foreman-base-url=<%= Setting[:foreman_url] %> \
  --foreman-proxy-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
  --foreman-proxy-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>

<%= _("Install provisioning without DHCP") %>

foreman-installer \
  --enable-foreman-proxy \
  --foreman-proxy-tftp=true \
  --foreman-proxy-tftp-servername=<%= provisioner.provision_interface_data[:ip] %> \
  --foreman-proxy-dns=true \
  --foreman-proxy-dns-interface=<%= provisioner.provision_interface %> \
  --foreman-proxy-dns-zone=<%= provisioner.domain.name %> \
  --foreman-proxy-dns-reverse=<%= provisioner.rdns_zone %> \
<%= provisioner.dns_forwarders.map { |f| "  --foreman-proxy-dns-forwarders=#{f} \\" }.join("\n") %>
  --foreman-proxy-foreman-base-url=<%= Setting[:foreman_url] %> \
  --foreman-proxy-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
  --foreman-proxy-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>
<%= content_tag(:div, :class => "form-actions") do content_tag(:div) do link_to(_("Next"), step4_foreman_setup_provisioner_path, :class => "btn btn-primary", :method => :post) end end %>