generate_disks_linux.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. shell: |
  24. make clean
  25. make EMBED={{ bootloader_filename }} \
  26. TRUST={{ trust_files }} \
  27. bin-x86_64-linux/slirp.linux
  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 Linux 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-x86_64-linux/slirp.linux
  40. args:
  41. chdir: "{{ ipxe_source_dir }}/src"
  42. tags:
  43. - skip_ansible_lint
  44. when: ipxe_debug_enabled | bool
  45. - name: Copy iPXE linux binary for Legacy BIOS to http directory
  46. ansible.builtin.copy:
  47. src: "{{ ipxe_source_dir }}/src/bin-x86_64-linux/slirp.linux"
  48. dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-linux.bin"
  49. remote_src: true
  50. when: bootloader_filename != "netboot.xyz-metal"