1
0

generate_disks_base.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. ---
  2. - name: Gathering facts
  3. setup:
  4. - name: Gather variables for each operating system
  5. include_vars: "{{ item }}"
  6. with_first_found:
  7. - "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
  8. - "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
  9. - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
  10. - "{{ ansible_distribution | lower }}.yml"
  11. - "{{ ansible_os_family | lower }}.yml"
  12. - name: Create iPXE file directories
  13. file:
  14. path: "{{ item }}"
  15. state: directory
  16. with_items:
  17. - "{{ netbootxyz_root }}/ipxe"
  18. - name: Copy helper apps
  19. copy:
  20. src: "{{ item }}"
  21. dest: "{{ netbootxyz_root }}"
  22. with_items:
  23. - memdisk
  24. - wimboot
  25. - name: Install required packages
  26. package:
  27. name: "{{ item }}"
  28. state: present
  29. with_items: "{{ netbootxyz_packages }}"
  30. - name: Check out latest iPXE sources
  31. git:
  32. repo: "{{ ipxe_repo }}"
  33. dest: "{{ ipxe_source_dir }}"
  34. version: "{{ ipxe_branch }}"
  35. - name: Copy iPXE Bootloader template to iPXE source directory
  36. template:
  37. src: "disks/{{ bootloader_filename }}.j2"
  38. dest: "{{ ipxe_source_dir }}/src/{{ bootloader_filename }}"
  39. - name: Touch iPXE config local files
  40. file:
  41. path: "{{ ipxe_source_dir }}/{{ item }}"
  42. state: touch
  43. with_items:
  44. - src/config/local/console.h
  45. - src/config/local/umalloc.h
  46. - src/config/local/nap.h
  47. - src/config/local/timer.h
  48. - src/config/local/branding.h
  49. - src/config/local/serial.h
  50. - src/config/local/reboot.h
  51. - src/config/local/sanboot.h
  52. - src/config/local/fault.h
  53. - src/config/local/dhcp.h
  54. - src/config/local/sideband.h
  55. - src/config/local/entropy.h
  56. - src/config/local/crypto.h
  57. - src/config/local/usb.h
  58. - src/config/local/settings.h