1
0

generate_disks_legacy.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. ---
  2. - name: Copy netboot.xyz local legacy iPXE configs
  3. ansible.builtin.copy:
  4. src: "ipxe/local/{{ item }}"
  5. dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
  6. with_items:
  7. - colour.h
  8. - console.h
  9. - crypto.h
  10. - general.h
  11. - name: Set trust file to ipxe ca
  12. ansible.builtin.set_fact:
  13. trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
  14. when: not generate_signatures
  15. - name: Combine trust args if set
  16. ansible.builtin.set_fact:
  17. trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
  18. when: generate_signatures | bool
  19. - name: Compile iPXE bootloader for Legacy BIOS
  20. ansible.builtin.shell: |
  21. make clean
  22. make EMBED={{ bootloader_filename }} \
  23. TRUST={{ trust_files }} \
  24. bin/ipxe.dsk \
  25. bin/ipxe.pdsk \
  26. bin/ipxe.lkrn \
  27. bin/ipxe.kpxe \
  28. bin/undionly.kpxe
  29. args:
  30. chdir: "{{ ipxe_source_dir }}/src"
  31. when: ipxe_debug_enabled | bool == false
  32. - name: Compile iPXE bootloader for Legacy BIOS with debug flags
  33. ansible.builtin.shell: |
  34. make clean
  35. make EMBED={{ bootloader_filename }} \
  36. DEBUG={{ ipxe_debug_options }} \
  37. TRUST={{ trust_files }} \
  38. bin/ipxe.dsk \
  39. bin/ipxe.pdsk \
  40. bin/ipxe.lkrn \
  41. bin/ipxe.kpxe \
  42. bin/undionly.kpxe
  43. args:
  44. chdir: "{{ ipxe_source_dir }}/src"
  45. when: ipxe_debug_enabled | bool
  46. - name: Copy iPXE files for Legacy BIOS to http directory
  47. ansible.builtin.copy:
  48. src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
  49. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
  50. remote_src: true
  51. with_items:
  52. - ".pdsk"
  53. - ".dsk"
  54. - ".lkrn"
  55. - ".kpxe"
  56. when: bootloader_filename != "netboot.xyz-metal"
  57. - name: Copy iPXE files for Legacy BIOS to http directory
  58. ansible.builtin.copy:
  59. src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
  60. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
  61. remote_src: true
  62. with_items:
  63. - ".kpxe"
  64. when: bootloader_filename == "netboot.xyz-metal"
  65. - name: Copy undionly.kpxe for Legacy BIOS to http directory
  66. ansible.builtin.copy:
  67. src: "{{ ipxe_source_dir }}/src/bin/undionly.kpxe"
  68. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-undionly.kpxe"
  69. remote_src: true
  70. when: bootloader_filename != "netboot.xyz-metal"