generate_disks_legacy.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ---
  2. - name: Copy netboot.xyz local legacy iPXE configs
  3. copy:
  4. src: "ipxe/local/{{ item }}"
  5. dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
  6. with_items:
  7. - colour.h
  8. - crypto.h
  9. - general.h
  10. - name: Set trust file to ipxe ca
  11. set_fact:
  12. trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
  13. when: not generate_signatures
  14. - name: Combine trust args if set
  15. set_fact:
  16. trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
  17. when: generate_signatures | bool
  18. - name: Compile iPXE bootloader for Legacy BIOS
  19. shell: |
  20. make clean
  21. make EMBED={{ bootloader_filename }} TRUST={{ trust_files }} bin/ipxe.dsk bin/ipxe.iso bin/ipxe.lkrn bin/ipxe.usb bin/ipxe.kpxe bin/undionly.kpxe
  22. args:
  23. chdir: "{{ ipxe_source_dir }}/src"
  24. tags:
  25. - skip_ansible_lint
  26. - name: Copy iPXE files for Legacy BIOS to http directory
  27. copy:
  28. src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
  29. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
  30. remote_src: True
  31. with_items:
  32. - ".dsk"
  33. - ".iso"
  34. - ".lkrn"
  35. - ".usb"
  36. - ".kpxe"
  37. when: bootloader_filename != "netboot.xyz-packet"
  38. - name: Copy iPXE files for Legacy BIOS to http directory
  39. copy:
  40. src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
  41. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
  42. remote_src: True
  43. with_items:
  44. - ".kpxe"
  45. when: bootloader_filename == "netboot.xyz-packet"
  46. - name: Copy undionly.kpxe for Legacy BIOS to http directory
  47. copy:
  48. src: "{{ ipxe_source_dir }}/src/bin/undionly.kpxe"
  49. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-undionly.kpxe"
  50. remote_src: True
  51. when: bootloader_filename != "netboot.xyz-packet"