generate_disks_linux.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. - 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 args 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 Linux bootloader for Legacy BIOS
  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-linux/slirp.linux
  29. args:
  30. chdir: "{{ ipxe_source_dir }}/src"
  31. when: ipxe_debug_enabled | bool == false
  32. - name: Compile iPXE Linux bootloader for Legacy BIOS with debug flags
  33. ansible.builtin.shell: |
  34. make clean
  35. make -j{{ make_num_jobs }} \
  36. EMBED={{ bootloader_filename }} \
  37. DEBUG={{ ipxe_debug_options }} \
  38. TRUST={{ trust_files }} \
  39. bin-x86_64-linux/slirp.linux
  40. args:
  41. chdir: "{{ ipxe_source_dir }}/src"
  42. when: ipxe_debug_enabled | bool
  43. - name: Copy iPXE linux binary for Legacy BIOS to http directory
  44. ansible.builtin.copy:
  45. src: "{{ ipxe_source_dir }}/src/bin-x86_64-linux/slirp.linux"
  46. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-linux.bin"
  47. remote_src: true
  48. when: bootloader_filename != "netboot.xyz-metal"