generate_disks_legacy.yml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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.pdsk \
  26. bin/ipxe.lkrn \
  27. bin/ipxe.kpxe \
  28. bin/undionly.kpxe
  29. args:
  30. chdir: "{{ ipxe_source_dir }}/src"
  31. tags:
  32. - skip_ansible_lint
  33. when: ipxe_debug_enabled | bool == false
  34. - name: Compile iPXE bootloader for Legacy BIOS with debug flags
  35. shell: |
  36. make clean
  37. make 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. tags:
  48. - skip_ansible_lint
  49. when: ipxe_debug_enabled | bool
  50. - name: Copy iPXE files for Legacy BIOS to http directory
  51. copy:
  52. src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
  53. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
  54. remote_src: True
  55. with_items:
  56. - ".pdsk"
  57. - ".dsk"
  58. - ".lkrn"
  59. - ".kpxe"
  60. when: bootloader_filename != "netboot.xyz-packet"
  61. - name: Copy iPXE files for Legacy BIOS to http directory
  62. copy:
  63. src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
  64. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
  65. remote_src: True
  66. with_items:
  67. - ".kpxe"
  68. when: bootloader_filename == "netboot.xyz-packet"
  69. - name: Copy undionly.kpxe for Legacy BIOS to http directory
  70. copy:
  71. src: "{{ ipxe_source_dir }}/src/bin/undionly.kpxe"
  72. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-undionly.kpxe"
  73. remote_src: True
  74. when: bootloader_filename != "netboot.xyz-packet"