diff --git a/spec/classes/ironic_inspector_spec.rb b/spec/classes/ironic_inspector_spec.rb index 618e0385..2e1299ad 100644 --- a/spec/classes/ironic_inspector_spec.rb +++ b/spec/classes/ironic_inspector_spec.rb @@ -293,6 +293,20 @@ describe 'ironic::inspector' do /kernel --timeout 30000/) end end + + context 'when using ipv6' do + before :each do + params.merge!( + :listen_address => 'fd00::1', + ) + end + + it 'should contain file /var/www/httpboot/inspector.ipxe' do + is_expected.to contain_file('/var/www/httpboot/inspector.ipxe').with_content( + /kernel http:\/\/\[fd00::1\]:3816\/agent.kernel ipa-inspection-callback-url=http:\/\/\[fd00::1\]:5050\/v1\/continue ipa-inspection-collectors=default.* foo=bar || goto retry_boot/ + ) + end + end end context 'when enabling ppc64le support' do diff --git a/templates/inspector_ipxe.erb b/templates/inspector_ipxe.erb index c80e299a..821ab2d7 100644 --- a/templates/inspector_ipxe.erb +++ b/templates/inspector_ipxe.erb @@ -2,6 +2,6 @@ :retry_boot imgfree -kernel <% if @ipxe_timeout_real != "0" %>--timeout <%= Integer(@ipxe_timeout_real) * 1000 %> <% end %>http://<%= @dnsmasq_local_ip %>:<%= @http_port_real %>/<%= @kernel_filename %> ipa-inspection-callback-url=http://<%= @dnsmasq_local_ip %>:5050/v1/continue ipa-inspection-collectors=<%= @ramdisk_collectors %> systemd.journald.forward_to_console=yes BOOTIF=${mac} <%= @ramdisk_kernel_args %> initrd=<%= @ramdisk_filename %> || goto retry_boot -initrd <% if @ipxe_timeout_real != "0" %>--timeout <%= Integer(@ipxe_timeout_real) * 1000 %> <% end %>http://<%= @dnsmasq_local_ip %>:<%= @http_port_real %>/<%= @ramdisk_filename %> || goto retry_boot +kernel <% if @ipxe_timeout_real != "0" %>--timeout <%= Integer(@ipxe_timeout_real) * 1000 %> <% end %>http://<%= @dnsmasq_local_ip_real %>:<%= @http_port_real %>/<%= @kernel_filename %> ipa-inspection-callback-url=http://<%= @dnsmasq_local_ip_real %>:5050/v1/continue ipa-inspection-collectors=<%= @ramdisk_collectors %> systemd.journald.forward_to_console=yes BOOTIF=${mac} <%= @ramdisk_kernel_args %> initrd=<%= @ramdisk_filename %> || goto retry_boot +initrd <% if @ipxe_timeout_real != "0" %>--timeout <%= Integer(@ipxe_timeout_real) * 1000 %> <% end %>http://<%= @dnsmasq_local_ip_real %>:<%= @http_port_real %>/<%= @ramdisk_filename %> || goto retry_boot boot