Переглянути джерело

Generate index depending on disk options

Adds a section for arm builds and allows for index
to be dynamic based on options selected
Antony 4 роки тому
батько
коміт
187d1a7f3f

+ 5 - 0
roles/netbootxyz/defaults/main.yml

@@ -6,6 +6,11 @@ bootloader_disks:
 bootloader_http_enabled: true
 bootloader_https_enabled: true
 bootloaders:
+  arm:
+  - desc: EFI w/ Simple Network Protocol, attempts to boot all net devices
+    ipxe_bin: snp.efi
+    output_bin: -arm64.efi
+    type: DHCP-snp
   legacy:
   - desc: Used for CD/DVD, Virtual CDs, DRAC/iLO, VMware, Virtual Box
     ipxe_bin: ipxe.iso

+ 28 - 0
roles/netbootxyz/templates/index.html.j2

@@ -33,6 +33,8 @@ exit
   Version: {{ boot_version }}<br>
   Powered by <a href=https://netboot.xyz>netboot.xyz</a>
   </p>
+
+{% if generate_disks_legacy == true %}
   <p>Legacy (PCBIOS) iPXE Bootloaders</p>
   <table style="width:100%">
     <!-- table header -->
@@ -50,7 +52,9 @@ exit
     </tr>
     {% endfor %}
   </table>
+{% endif %}
 
+{% if generate_disks_efi == true %}
   <p>UEFI iPXE Bootloaders</p>
 
   <table style="width:100%">
@@ -69,7 +73,30 @@ exit
     </tr>
     {% endfor %}
   </table>
+{% endif %}
+
+{% if generate_disks_arm == true %}
+  <p>ARM64 iPXE Bootloaders - Experimental</p>
+
+  <table style="width:100%">
+    <!-- table header -->
+    <tr>
+       <th> Type </th>
+       <th> Bootloader </th>
+       <th> Description </th>
+    </tr>
+    <!-- table rows -->
+    {% for item in bootloaders.arm %}
+    <tr>
+       <td> {{ item.type }} </td>
+       <td> <a href="ipxe/{{ site_name }}{{ item.output_bin }}">{{ site_name }}{{ item.output_bin }}</a> </td>
+       <td> {{ item.desc }} </td>
+    </tr>
+    {% endfor %}
+  </table>
+{% endif %}
 
+{% if generate_disks_rpi == true %}
   <p>Raspberry Pi iPXE Bootloaders - Experimental</p>
 
   <table style="width:100%">
@@ -88,6 +115,7 @@ exit
     </tr>
     {% endfor %}
   </table>
+{% endif %}
 
   <p>Checksums<p>