1
0

generate_disks_legacy.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 -j{{ make_num_jobs }} \
  23. EMBED={{ bootloader_filename }} \
  24. TRUST={{ trust_files }} \
  25. bin/ipxe.dsk \
  26. bin/ipxe.pdsk \
  27. bin/ipxe.lkrn \
  28. bin/ipxe.kpxe \
  29. bin/undionly.kpxe
  30. args:
  31. chdir: "{{ ipxe_source_dir }}/src"
  32. when: ipxe_debug_enabled | bool == false
  33. - name: Compile iPXE bootloader for Legacy BIOS with debug flags
  34. ansible.builtin.shell: |
  35. make clean
  36. make -j{{ make_num_jobs }} \
  37. EMBED={{ bootloader_filename }} \
  38. DEBUG={{ ipxe_debug_options }} \
  39. TRUST={{ trust_files }} \
  40. bin/ipxe.dsk \
  41. bin/ipxe.pdsk \
  42. bin/ipxe.lkrn \
  43. bin/ipxe.kpxe \
  44. bin/undionly.kpxe
  45. args:
  46. chdir: "{{ ipxe_source_dir }}/src"
  47. when: ipxe_debug_enabled | bool
  48. - name: Copy iPXE files for Legacy BIOS to http directory
  49. ansible.builtin.copy:
  50. src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
  51. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
  52. remote_src: true
  53. with_items:
  54. - ".pdsk"
  55. - ".dsk"
  56. - ".lkrn"
  57. - ".kpxe"
  58. when: bootloader_filename != "netboot.xyz-metal"
  59. - name: Copy iPXE files for Legacy BIOS to http directory
  60. ansible.builtin.copy:
  61. src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
  62. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
  63. remote_src: true
  64. with_items:
  65. - ".kpxe"
  66. when: bootloader_filename == "netboot.xyz-metal"
  67. - name: Copy undionly.kpxe for Legacy BIOS to http directory
  68. ansible.builtin.copy:
  69. src: "{{ ipxe_source_dir }}/src/bin/undionly.kpxe"
  70. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-undionly.kpxe"
  71. remote_src: true
  72. when: bootloader_filename != "netboot.xyz-metal"