generate_disks_legacy.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. - console.h
  9. - crypto.h
  10. - general.h
  11. - name: Set trust file to ipxe ca
  12. set_fact:
  13. trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
  14. when: not generate_signatures
  15. - name: Combine trust args if set
  16. 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. shell: |
  21. make clean
  22. make EMBED={{ bootloader_filename }} \
  23. TRUST={{ trust_files }} \
  24. bin/ipxe.dsk \
  25. bin/ipxe.lkrn \
  26. bin/ipxe.kpxe \
  27. bin/undionly.kpxe
  28. args:
  29. chdir: "{{ ipxe_source_dir }}/src"
  30. tags:
  31. - skip_ansible_lint
  32. when: ipxe_debug_enabled | bool == false
  33. - name: Compile iPXE bootloader for Legacy BIOS with debug flags
  34. shell: |
  35. make clean
  36. make EMBED={{ bootloader_filename }} \
  37. DEBUG={{ ipxe_debug_options }} \
  38. TRUST={{ trust_files }} \
  39. bin/ipxe.dsk \
  40. bin/ipxe.lkrn \
  41. bin/ipxe.kpxe \
  42. bin/undionly.kpxe
  43. args:
  44. chdir: "{{ ipxe_source_dir }}/src"
  45. tags:
  46. - skip_ansible_lint
  47. when: ipxe_debug_enabled | bool
  48. - name: Copy iPXE files for Legacy BIOS to http directory
  49. 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. - ".dsk"
  55. - ".lkrn"
  56. - ".kpxe"
  57. when: bootloader_filename != "netboot.xyz-packet"
  58. - name: Copy iPXE files for Legacy BIOS to http directory
  59. copy:
  60. src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
  61. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
  62. remote_src: True
  63. with_items:
  64. - ".kpxe"
  65. when: bootloader_filename == "netboot.xyz-packet"
  66. - name: Copy undionly.kpxe for Legacy BIOS to http directory
  67. copy:
  68. src: "{{ ipxe_source_dir }}/src/bin/undionly.kpxe"
  69. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-undionly.kpxe"
  70. remote_src: True
  71. when: bootloader_filename != "netboot.xyz-packet"