generate_disks_efi.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ---
  2. - name: Copy netboot.xyz local EFI 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. - name: Copy netboot.xyz general.h.efi iPXE config
  11. ansible.builtin.copy:
  12. src: "ipxe/local/general.h.efi"
  13. dest: "{{ ipxe_source_dir }}/src/config/local/general.h"
  14. - name: Set trust file to ipxe ca
  15. ansible.builtin.set_fact:
  16. trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
  17. when: not generate_signatures
  18. - name: Combine trust files if set
  19. ansible.builtin.set_fact:
  20. trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
  21. when: generate_signatures | bool
  22. - name: Compile iPXE bootloader for EFI
  23. ansible.builtin.shell: |
  24. make clean
  25. make -j{{ make_num_jobs }} \
  26. EMBED={{ bootloader_filename }} \
  27. TRUST={{ trust_files }} \
  28. bin-x86_64-efi/ipxe.efi \
  29. bin-x86_64-efi/snp.efi \
  30. bin-x86_64-efi/snponly.efi
  31. args:
  32. chdir: "{{ ipxe_source_dir }}/src"
  33. when: ipxe_debug_enabled | bool == false
  34. - name: Compile iPXE bootloader for EFI with debug flags
  35. ansible.builtin.shell: |
  36. make clean
  37. make -j{{ make_num_jobs }} \
  38. EMBED={{ bootloader_filename }} \
  39. DEBUG={{ ipxe_debug_options }} \
  40. TRUST={{ trust_files }} \
  41. bin-x86_64-efi/ipxe.efi \
  42. bin-x86_64-efi/snp.efi \
  43. bin-x86_64-efi/snponly.efi
  44. args:
  45. chdir: "{{ ipxe_source_dir }}/src"
  46. when: ipxe_debug_enabled | bool
  47. - name: Copy iPXE EFI builds to http directory
  48. ansible.builtin.copy:
  49. src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
  50. dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
  51. remote_src: true
  52. with_items:
  53. - {src: "bin-x86_64-efi/ipxe.efi", dest: "{{ bootloader_filename }}.efi"}
  54. - {src: "bin-x86_64-efi/snp.efi", dest: "{{ bootloader_filename }}-snp.efi"}
  55. - {src: "bin-x86_64-efi/snponly.efi", dest: "{{ bootloader_filename }}-snponly.efi"}