|
8 | 8 |
|
9 | 9 | admin_net = Barclamp::Inventory.get_network_definition(node, "admin") |
10 | 10 | lease_time = node[:provisioner][:dhcp]["lease-time"] |
| 11 | +admin6_uri = "tftp://[#{admin_ip}]/discovery" |
11 | 12 |
|
12 | | -ipv4_dhcp_opts = ["allow unknown-clients", |
13 | | - "default-lease-time #{lease_time}", |
14 | | - "max-lease-time #{lease_time}", |
15 | | - 'if exists dhcp-parameter-request-list { |
| 13 | +ipv4_dhcp_opts = [ |
| 14 | + "allow unknown-clients", |
| 15 | + "default-lease-time #{lease_time}", |
| 16 | + "max-lease-time #{lease_time}", |
| 17 | + 'if exists dhcp-parameter-request-list { |
16 | 18 | # Always send the PXELINUX options (specified in hexadecimal) |
17 | 19 | option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3); |
18 | 20 | }', |
19 | | - 'if option arch = 00:06 { |
| 21 | + 'if option arch = 00:06 { |
20 | 22 | filename = "discovery/ia32/efi/bootia32.efi"; |
21 | 23 | } else if option arch = 00:07 { |
22 | 24 | filename = "discovery/x86_64/efi/default/boot/bootx64.efi"; |
|
30 | 32 | } else { |
31 | 33 | filename = "discovery/x86_64/bios/pxelinux.0"; |
32 | 34 | }', |
33 | | - "next-server #{admin_ip}"] |
| 35 | + "next-server #{admin_ip}" |
| 36 | +] |
34 | 37 |
|
35 | | -ipv6_dhcp_opts = ["allow unknown-clients", |
36 | | - "default-lease-time #{lease_time}", |
37 | | - "max-lease-time #{lease_time}", |
38 | | - 'if exists dhcp-parameter-request-list { |
| 38 | +ipv6_dhcp_opts = [ |
| 39 | + "allow unknown-clients", |
| 40 | + "default-lease-time #{lease_time}", |
| 41 | + "max-lease-time #{lease_time}", |
| 42 | + 'if exists dhcp-parameter-request-list { |
39 | 43 | # Always send the PXELINUX options (specified in hexadecimal) |
40 | 44 | option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3); |
41 | 45 | }', |
42 | | - "if option dhcp6.client-arch-type = 00:06 { |
43 | | - option dhcp6.bootfile-url \"tftp://[#{admin_ip}]/discovery/ia32/efi/bootia32.efi\"; |
| 46 | + "if option dhcp6.client-arch-type = 00:06 { |
| 47 | + option dhcp6.bootfile-url \"#{admin6_uri}/ia32/efi/bootia32.efi\"; |
44 | 48 | } else if option dhcp6.client-arch-type = 00:07 { |
45 | | - option dhcp6.bootfile-url \"tftp://[#{admin_ip}]/discovery/x86_64/efi/default/boot/bootx64.efi\"; |
| 49 | + option dhcp6.bootfile-url \"/#{admin6_uri}x86_64/efi/default/boot/bootx64.efi\"; |
46 | 50 | } else if option dhcp6.client-arch-type = 00:09 { |
47 | | - option dhcp6.bootfile-url \"tftp://[#{admin_ip}]/discovery/x86_64/efi/default/boot/bootx64.efi\"; |
| 51 | + option dhcp6.bootfile-url \"#{admin6_uri}/x86_64/efi/default/boot/bootx64.efi\"; |
48 | 52 | } else if option dhcp6.client-arch-type = 00:0b { |
49 | | - option dhcp6.bootfile-url \"tftp://[#{admin_ip}]/discovery/aarch64/efi/default/boot/bootaa64.efi\"; |
| 53 | + option dhcp6.bootfile-url \"#{admin6_uri}/aarch64/efi/default/boot/bootaa64.efi\"; |
50 | 54 | } else if option dhcp6.client-arch-type = 00:0e { |
51 | | - option dhcp6.bootfile-url \"tftp://[#{admin_ip}]/discovery/discovery/ppc64le/bios/\"; |
| 55 | + option dhcp6.bootfile-url \"#{admin6_uri}/discovery/ppc64le/bios/\"; |
52 | 56 | } else { |
53 | | - option dhcp6.bootfile-url \"tftp://[#{admin_ip}]/discovery/x86_64/bios/pxelinux.0\"; |
54 | | - }"] |
| 57 | + option dhcp6.bootfile-url \"#{admin6_uri}/x86_64/bios/pxelinux.0\"; |
| 58 | + }" |
| 59 | +] |
55 | 60 |
|
56 | 61 | pool_opts = { |
57 | 62 | "host" => ["deny unknown-clients"] |
|
0 commit comments