generate_checksums.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. ---
  2. - name: Register a listing of all created iPXE bootloaders
  3. ansible.builtin.command: ls -I {{ checksums_filename }} {{ netbootxyz_root }}/ipxe/
  4. register: netboot_disks
  5. - name: Generate date
  6. ansible.builtin.command: date
  7. register: current_date
  8. - name: Gather stat listing of directory
  9. ansible.builtin.command: sha256sum -b {{ item }}
  10. with_items:
  11. - "{{ netboot_disks.stdout_lines }}"
  12. args:
  13. chdir: "{{ netbootxyz_root }}/ipxe/"
  14. register: netboot_disks_stat
  15. - name: Generate ipxe disk checksums
  16. ansible.builtin.template:
  17. src: checksums.txt.j2
  18. dest: "{{ netbootxyz_root }}/ipxe/{{ checksums_filename }}"
  19. - name: Generate site name banner for index
  20. ansible.builtin.shell: toilet -f standard {{ site_name }} --html | grep span
  21. register: index_title
  22. when: ansible_os_family == "Debian"
  23. - name: Reset bootloader filename to first in list
  24. ansible.builtin.set_fact:
  25. bootloader_filename: "{{ bootloader_disks | first }}"
  26. - name: Generate netboot.xyz index template
  27. ansible.builtin.template:
  28. src: index.html.j2
  29. dest: "{{ netbootxyz_root }}/index.html"