Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions roles/netbootxyz/tasks/generate_checksums.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
- name: Register a listing of all created iPXE bootloaders
ansible.builtin.command: ls -I {{ checksums_filename }} {{ netbootxyz_root }}/ipxe/
register: netboot_disks
check_mode: False

- name: Generate date
ansible.builtin.command: date
register: current_date
check_mode: False

- name: Gather stat listing of directory
ansible.builtin.command: sha256sum -b {{ item }}
Expand All @@ -14,6 +16,7 @@
args:
chdir: "{{ netbootxyz_root }}/ipxe/"
register: netboot_disks_stat
check_mode: False

- name: Generate ipxe disk checksums
ansible.builtin.template:
Expand All @@ -24,6 +27,7 @@
ansible.builtin.shell: toilet -f standard {{ site_name }} --html | grep span
register: index_title
when: ansible_os_family == "Debian"
check_mode: False

- name: Reset bootloader filename to first in list
ansible.builtin.set_fact:
Expand Down
1 change: 1 addition & 0 deletions roles/netbootxyz/tasks/generate_disks_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
remote_src: true
ignore_errors: "{{ ansible_check_mode }}"
with_items:
- {src: "bin-arm64-efi/ipxe.efi", dest: "{{ bootloader_filename }}-arm64.efi"}
- {src: "bin-arm64-efi/snp.efi", dest: "{{ bootloader_filename }}-arm64-snp.efi"}
Expand Down
2 changes: 2 additions & 0 deletions roles/netbootxyz/tasks/generate_disks_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@
ansible.builtin.template:
src: "disks/{{ bootloader_filename }}.j2"
dest: "{{ ipxe_source_dir }}/src/{{ bootloader_filename }}"
ignore_errors: "{{ ansible_check_mode }}"

- name: Touch iPXE config local files
ansible.builtin.file:
path: "{{ ipxe_source_dir }}/{{ item }}"
state: touch
ignore_errors: "{{ ansible_check_mode }}"
with_items:
- src/config/local/umalloc.h
- src/config/local/nap.h
Expand Down
1 change: 1 addition & 0 deletions roles/netbootxyz/tasks/generate_disks_efi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
remote_src: true
ignore_errors: "{{ ansible_check_mode }}"
with_items:
- {src: "bin-x86_64-efi/ipxe.efi", dest: "{{ bootloader_filename }}.efi"}
- {src: "bin-x86_64-efi/snp.efi", dest: "{{ bootloader_filename }}-snp.efi"}
Expand Down
3 changes: 3 additions & 0 deletions roles/netbootxyz/tasks/generate_disks_legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
remote_src: true
ignore_errors: "{{ ansible_check_mode }}"
with_items:
- ".pdsk"
- ".dsk"
Expand All @@ -68,6 +69,7 @@
src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
remote_src: true
ignore_errors: "{{ ansible_check_mode }}"
with_items:
- ".kpxe"
when: bootloader_filename == "netboot.xyz-metal"
Expand All @@ -77,4 +79,5 @@
src: "{{ ipxe_source_dir }}/src/bin/undionly.kpxe"
dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-undionly.kpxe"
remote_src: true
ignore_errors: "{{ ansible_check_mode }}"
when: bootloader_filename != "netboot.xyz-metal"
1 change: 1 addition & 0 deletions roles/netbootxyz/tasks/generate_disks_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@
src: "{{ ipxe_source_dir }}/src/bin-x86_64-linux/slirp.linux"
dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-linux.bin"
remote_src: true
ignore_errors: "{{ ansible_check_mode }}"
when: bootloader_filename != "netboot.xyz-metal"
4 changes: 4 additions & 0 deletions roles/netbootxyz/tasks/generate_disks_rpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
ansible.builtin.template:
src: "disks/{{ bootloader_filename }}.j2"
dest: "{{ pipxe_source_dir }}/ipxe/src/{{ bootloader_filename }}"
ignore_errors: "{{ ansible_check_mode }}"

- name: Copy netboot.xyz local EFI iPXE configs
ansible.builtin.copy:
src: "ipxe/local/{{ item }}"
dest: "{{ pipxe_source_dir }}/ipxe/src/config/local/{{ item }}"
ignore_errors: "{{ ansible_check_mode }}"
with_items:
- colour.h
- console.h
Expand All @@ -32,6 +34,7 @@
ansible.builtin.copy:
src: "ipxe/local/general.h.efi"
dest: "{{ pipxe_source_dir }}/ipxe/src/config/local/general.h"
ignore_errors: "{{ ansible_check_mode }}"

- name: Set trust file to ipxe ca
ansible.builtin.set_fact:
Expand Down Expand Up @@ -59,6 +62,7 @@
src: "{{ pipxe_source_dir }}/{{ item.src }}"
dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
remote_src: true
ignore_errors: "{{ ansible_check_mode }}"
with_items:
- {src: "sdcard.img", dest: "{{ bootloader_filename }}-rpi4-sdcard.img"}
- {src: "ipxe/src/bin-arm64-efi/snp.efi", dest: "{{ bootloader_filename }}-rpi4-snp.efi"}
1 change: 1 addition & 0 deletions roles/netbootxyz/tasks/generate_menus_custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
dest: "{{ netbootxyz_root }}/custom/{{ item.path | regex_replace('.j2', '') }}"
with_community.general.filetree: "{{ custom_templates_dir }}"
when: item.state == "file"
ignore_errors: "{{ ansible_check_mode }}"
2 changes: 2 additions & 0 deletions roles/netbootxyz/tasks/generate_signatures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- name: Gather list of source files
ansible.builtin.command: ls {{ netbootxyz_root }}
register: source_files
check_mode: False
Copy link

Copilot AI Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting 'check_mode: False' here disables check mode for the task that gathers source files. If the intent is to support check mode, consider conditionally applying this flag based on the ansible_check_mode variable.

Suggested change
check_mode: False
when: not ansible_check_mode

Copilot uses AI. Check for mistakes.

- name: Create directories for signatures
ansible.builtin.file:
Expand All @@ -19,3 +20,4 @@
chdir: "{{ cert_dir }}"
with_items:
- "{{ source_files.stdout_lines }}"
ignore_errors: "{{ ansible_check_mode }}"