瀏覽代碼

Lint fixes

Antony Messerli 3 年之前
父節點
當前提交
d6ada65175

+ 2 - 2
.github/workflows/pull-requests.yml

@@ -19,7 +19,7 @@ jobs:
     - name: Install dependencies
     - name: Install dependencies
       run: |
       run: |
         python -m pip install --upgrade pip
         python -m pip install --upgrade pip
-        pip install ansible==5.4.0 ansible-lint==5.4.0
+        pip install ansible ansible-lint
 
 
     - name: Syntax Check
     - name: Syntax Check
       run: |
       run: |
@@ -27,7 +27,7 @@ jobs:
 
 
     - name: Ansible lint
     - name: Ansible lint
       run: |
       run: |
-        ansible-lint -v roles/netbootxyz
+        ansible-lint -v roles/netbootxyz/tasks
 
 
   build-pr:
   build-pr:
     name: Build Pull Request
     name: Build Pull Request

+ 33 - 33
roles/netbootxyz/tasks/generate_checksums.yml

@@ -1,39 +1,39 @@
 ---
 ---
-  - name: Register a listing of all created iPXE bootloaders
-    command: ls -I {{ checksums_filename }} {{ netbootxyz_root }}/ipxe/
-    register: netboot_disks
-    tags:
-      - skip_ansible_lint
+- name: Register a listing of all created iPXE bootloaders
+  command: ls -I {{ checksums_filename }} {{ netbootxyz_root }}/ipxe/
+  register: netboot_disks
+  tags:
+    - skip_ansible_lint
 
 
-  - name: Generate date
-    command: date
-    register: current_date
-    tags:
-      - skip_ansible_lint
+- name: Generate date
+  command: date
+  register: current_date
+  tags:
+    - skip_ansible_lint
 
 
-  - name: Gather stat listing of directory
-    command: sha256sum -b {{ item }}
-    with_items:
-      - "{{ netboot_disks.stdout_lines }}"
-    args:
-      chdir: "{{ netbootxyz_root }}/ipxe/"
-    register: netboot_disks_stat
-    tags:
-      - skip_ansible_lint
+- name: Gather stat listing of directory
+  command: sha256sum -b {{ item }}
+  with_items:
+    - "{{ netboot_disks.stdout_lines }}"
+  args:
+    chdir: "{{ netbootxyz_root }}/ipxe/"
+  register: netboot_disks_stat
+  tags:
+    - skip_ansible_lint
 
 
-  - name: Generate ipxe disk checksums
-    template:
-      src: checksums.txt.j2
-      dest: "{{ netbootxyz_root }}/ipxe/{{ checksums_filename }}"
+- name: Generate ipxe disk checksums
+  ansible.builtin.template:
+    src: checksums.txt.j2
+    dest: "{{ netbootxyz_root }}/ipxe/{{ checksums_filename }}"
 
 
-  - name: Generate site name banner for index
-    shell: toilet -f standard {{ site_name }} --html | grep span
-    register: index_title
-    tags:
-      - skip_ansible_lint
-    when: ansible_os_family == "Debian"
+- name: Generate site name banner for index
+  shell: toilet -f standard {{ site_name }} --html | grep span
+  register: index_title
+  tags:
+    - skip_ansible_lint
+  when: ansible_os_family == "Debian"
 
 
-  - name: Generate netboot.xyz index template
-    template:
-      src: index.html.j2
-      dest: "{{ netbootxyz_root }}/index.html"
+- name: Generate netboot.xyz index template
+  ansible.builtin.template:
+    src: index.html.j2
+    dest: "{{ netbootxyz_root }}/index.html"

+ 13 - 13
roles/netbootxyz/tasks/generate_disks.yml

@@ -1,30 +1,30 @@
 ---
 ---
 
 
-  - include_tasks: generate_disks_base.yml
+- include_tasks: generate_disks_base.yml
 
 
-  - include_tasks: generate_disks_legacy.yml
-    when:
+- include_tasks: generate_disks_legacy.yml
+  when:
     - generate_disks_legacy | default(true) | bool
     - generate_disks_legacy | default(true) | bool
 
 
-  - include_tasks: generate_disks_linux.yml
-    when:
+- include_tasks: generate_disks_linux.yml
+  when:
     - generate_disks_linux | default(false) | bool
     - generate_disks_linux | default(false) | bool
 
 
-  - include_tasks: generate_disks_efi.yml
-    when:
+- include_tasks: generate_disks_efi.yml
+  when:
     - generate_disks_efi | default(true) | bool
     - generate_disks_efi | default(true) | bool
 
 
-  - include_tasks: generate_disks_arm.yml
-    when:
+- include_tasks: generate_disks_arm.yml
+  when:
     - generate_disks_arm | default(false) | bool
     - generate_disks_arm | default(false) | bool
 
 
-  - include_tasks: generate_disks_rpi.yml
-    when:
+- include_tasks: generate_disks_rpi.yml
+  when:
     - generate_disks_rpi | default(false) | bool
     - generate_disks_rpi | default(false) | bool
     - bootloader_filename == "netboot.xyz"
     - bootloader_filename == "netboot.xyz"
 
 
-  - include_tasks: generate_disks_hybrid.yml
-    when:
+- include_tasks: generate_disks_hybrid.yml
+  when:
     - generate_disks_hybrid | default(false) | bool
     - generate_disks_hybrid | default(false) | bool
     - generate_disks_legacy | default(true) | bool
     - generate_disks_legacy | default(true) | bool
     - generate_disks_efi | default(true) | bool
     - generate_disks_efi | default(true) | bool

+ 76 - 76
roles/netbootxyz/tasks/generate_disks_arm.yml

@@ -1,86 +1,86 @@
 ---
 ---
 
 
-    - name: Copy netboot.xyz local EFI iPXE configs
-      copy:
-        src: "ipxe/local/{{ item }}"
-        dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
-      with_items:
-        - colour.h
-        - console.h
-        - crypto.h
+- name: Copy netboot.xyz local EFI iPXE configs
+  ansible.builtin.copy:
+    src: "ipxe/local/{{ item }}"
+    dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
+  with_items:
+    - colour.h
+    - console.h
+    - crypto.h
 
 
-    - name: Copy netboot.xyz general.h.efi iPXE config
-      copy:
-        src: "ipxe/local/general.h.efi"
-        dest: "{{ ipxe_source_dir }}/src/config/local/general.h"
+- name: Copy netboot.xyz general.h.efi iPXE config
+  ansible.builtin.copy:
+    src: "ipxe/local/general.h.efi"
+    dest: "{{ ipxe_source_dir }}/src/config/local/general.h"
 
 
-    - name: Set trust file to ipxe ca
-      set_fact:
-        trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
-      when: not generate_signatures
+- name: Set trust file to ipxe ca
+  ansible.builtin.set_fact:
+    trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
+  when: not generate_signatures
 
 
-    - name: Combine trust files if set
-      set_fact:
-        trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
-      when: generate_signatures | bool
+- name: Combine trust files if set
+  ansible.builtin.set_fact:
+    trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
+  when: generate_signatures | bool
 
 
-    # iPXE workaround
-    # http://lists.ipxe.org/pipermail/ipxe-devel/2018-August/006254.html
-    # apply patch to fix arm64 builds on amd64 builds
-    - name: iPXE Workaround for arm
-      shell: sed -i '/WORKAROUND_CFLAGS/d' arch/arm64/Makefile
-      args:
-        chdir: "{{ ipxe_source_dir }}/src"
-      tags:
-      - skip_ansible_lint
+# iPXE workaround
+# http://lists.ipxe.org/pipermail/ipxe-devel/2018-August/006254.html
+# apply patch to fix arm64 builds on amd64 builds
+- name: iPXE Workaround for arm
+  shell: sed -i '/WORKAROUND_CFLAGS/d' arch/arm64/Makefile
+  args:
+    chdir: "{{ ipxe_source_dir }}/src"
+  tags:
+    - skip_ansible_lint
 
 
-    - name: Compile iPXE bootloaders for EFI arm64
-      shell: |
-        make clean
-        make CROSS_COMPILE=aarch64-linux-gnu- \
-             ARCH=arm64 \
-             EMBED={{ bootloader_filename }} \
-             TRUST={{ trust_files }} \
-             bin-arm64-efi/ipxe.efi \
-             bin-arm64-efi/snp.efi \
-             bin-arm64-efi/snponly.efi
-      args:
-        chdir: "{{ ipxe_source_dir }}/src"
-      tags:
-      - skip_ansible_lint
-      when: ipxe_debug_enabled | bool == false
+- name: Compile iPXE bootloaders for EFI arm64
+  shell: |
+    make clean
+    make CROSS_COMPILE=aarch64-linux-gnu- \
+         ARCH=arm64 \
+         EMBED={{ bootloader_filename }} \
+         TRUST={{ trust_files }} \
+         bin-arm64-efi/ipxe.efi \
+         bin-arm64-efi/snp.efi \
+         bin-arm64-efi/snponly.efi
+  args:
+    chdir: "{{ ipxe_source_dir }}/src"
+  tags:
+    - skip_ansible_lint
+  when: ipxe_debug_enabled | bool == false
 
 
-    - name: Compile iPXE bootloader for EFI arm64 with debug flags
-      shell: |
-        make clean
-        make CROSS_COMPILE=aarch64-linux-gnu- \
-             ARCH=arm64 \
-             DEBUG={{ ipxe_debug_options }} \
-             EMBED={{ bootloader_filename }} \
-             TRUST={{ trust_files }} \
-             bin-arm64-efi/snp.efi
-      args:
-        chdir: "{{ ipxe_source_dir }}/src"
-      tags:
-      - skip_ansible_lint
-      when: ipxe_debug_enabled | bool
+- name: Compile iPXE bootloader for EFI arm64 with debug flags
+  shell: |
+    make clean
+    make CROSS_COMPILE=aarch64-linux-gnu- \
+         ARCH=arm64 \
+         DEBUG={{ ipxe_debug_options }} \
+         EMBED={{ bootloader_filename }} \
+         TRUST={{ trust_files }} \
+         bin-arm64-efi/snp.efi
+  args:
+    chdir: "{{ ipxe_source_dir }}/src"
+  tags:
+    - skip_ansible_lint
+  when: ipxe_debug_enabled | bool
 
 
-    - name: Copy iPXE arm64 EFI builds to http directory
-      copy:
-        src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
-        dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
-        remote_src: True
-      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" }
-        - { src: "bin-arm64-efi/snponly.efi", dest: "{{ bootloader_filename }}-arm64-snponly.efi" }
-      when: bootloader_filename != "netboot.xyz-metal"
+- name: Copy iPXE arm64 EFI builds to http directory
+  ansible.builtin.copy:
+    src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
+    dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
+    remote_src: true
+  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"}
+    - {src: "bin-arm64-efi/snponly.efi", dest: "{{ bootloader_filename }}-arm64-snponly.efi"}
+  when: bootloader_filename != "netboot.xyz-metal"
 
 
-    - name: Copy iPXE arm64 EFI builds to http directory for Equinix Metal
-      copy:
-        src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
-        dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
-        remote_src: True
-      with_items:
-        - { src: "bin-arm64-efi/snp.efi", dest: "{{ bootloader_filename }}-arm64.efi" }
-      when: bootloader_filename == "netboot.xyz-metal"
+- name: Copy iPXE arm64 EFI builds to http directory for Equinix Metal
+  ansible.builtin.copy:
+    src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
+    dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
+    remote_src: true
+  with_items:
+    - {src: "bin-arm64-efi/snp.efi", dest: "{{ bootloader_filename }}-arm64.efi"}
+  when: bootloader_filename == "netboot.xyz-metal"

+ 75 - 75
roles/netbootxyz/tasks/generate_disks_base.yml

@@ -1,88 +1,88 @@
 ---
 ---
 
 
-  - name: Gathering facts
-    setup:
+- name: Gathering facts
+  ansible.builtin.setup:
 
 
-  - name: Gather variables for each operating system
-    include_vars: "{{ item }}"
-    with_first_found:
-      - "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
-      - "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
-      - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
-      - "{{ ansible_distribution | lower }}.yml"
-      - "{{ ansible_os_family | lower }}.yml"
+- name: Gather variables for each operating system
+  ansible.builtin.include_vars: "{{ item }}"
+  with_first_found:
+    - "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
+    - "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
+    - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
+    - "{{ ansible_distribution | lower }}.yml"
+    - "{{ ansible_os_family | lower }}.yml"
 
 
-  - name: Ensure EPEL is enabled
-    yum:
-      name: epel-release
-      state: present
-    when:
-      - ansible_distribution == "CentOS"
+- name: Ensure EPEL is enabled
+  ansible.builtin.yum:
+    name: epel-release
+    state: present
+  when:
+    - ansible_distribution == "CentOS"
 
 
-  - name: Set var to bootloader of loop
-    set_fact:
-      bootloader_filename: "{{ bootloader_file }}"
+- name: Set var to bootloader of loop
+  ansible.builtin.set_fact:
+    bootloader_filename: "{{ bootloader_file }}"
 
 
-  - name: Create iPXE file directories
-    file:
-      path: "{{ item }}"
-      state: directory
-    with_items:
-      - "{{ netbootxyz_root }}/ipxe"
-      - "{{ cert_dir }}"
+- name: Create iPXE file directories
+  ansible.builtin.file:
+    path: "{{ item }}"
+    state: directory
+  with_items:
+    - "{{ netbootxyz_root }}/ipxe"
+    - "{{ cert_dir }}"
 
 
-  - name: Retreive latest wimboot
-    get_url:
-      url: "{{ wimboot_upstream_url }}"
-      dest: "{{ netbootxyz_root }}/wimboot"
+- name: Retreive latest wimboot
+  ansible.builtin.get_url:
+    url: "{{ wimboot_upstream_url }}"
+    dest: "{{ netbootxyz_root }}/wimboot"
 
 
-  - name: Copy helper apps
-    copy:
-      src: "{{ item }}"
-      dest: "{{ netbootxyz_root }}"
-    with_items:
-      - memdisk
+- name: Copy helper apps
+  ansible.builtin.copy:
+    src: "{{ item }}"
+    dest: "{{ netbootxyz_root }}"
+  with_items:
+    - memdisk
 
 
-  - name: Install required packages
-    package:
-      name: "{{ item }}"
-      state: present
-    with_items: "{{ netbootxyz_packages }}"
+- name: Install required packages
+  ansible.builtin.package:
+    name: "{{ item }}"
+    state: present
+  with_items: "{{ netbootxyz_packages }}"
 
 
-  - name: Check out latest iPXE sources
-    git:
-      repo: "{{ ipxe_repo }}"
-      dest: "{{ ipxe_source_dir }}"
-      version: "{{ ipxe_branch }}"
-      force: true
-    register: ipxe_git_checkout
+- name: Check out latest iPXE sources
+  ansible.builtin.git:
+    repo: "{{ ipxe_repo }}"
+    dest: "{{ ipxe_source_dir }}"
+    version: "{{ ipxe_branch }}"
+    force: true
+  register: ipxe_git_checkout
 
 
-  - name: Copy iPXE Bootloader template to iPXE source directory
-    template:
-      src: "disks/{{ bootloader_filename }}.j2"
-      dest: "{{ ipxe_source_dir }}/src/{{ bootloader_filename }}"
+- name: Copy iPXE Bootloader template to iPXE source directory
+  ansible.builtin.template:
+    src: "disks/{{ bootloader_filename }}.j2"
+    dest: "{{ ipxe_source_dir }}/src/{{ bootloader_filename }}"
 
 
-  - name: Touch iPXE config local files
-    file:
-      path: "{{ ipxe_source_dir }}/{{ item }}"
-      state: touch
-    with_items:
-      - src/config/local/umalloc.h
-      - src/config/local/nap.h
-      - src/config/local/timer.h
-      - src/config/local/branding.h
-      - src/config/local/serial.h
-      - src/config/local/reboot.h
-      - src/config/local/sanboot.h
-      - src/config/local/fault.h
-      - src/config/local/dhcp.h
-      - src/config/local/sideband.h
-      - src/config/local/entropy.h
-      - src/config/local/crypto.h
-      - src/config/local/usb.h
-      - src/config/local/settings.h
+- name: Touch iPXE config local files
+  ansible.builtin.file:
+    path: "{{ ipxe_source_dir }}/{{ item }}"
+    state: touch
+  with_items:
+    - src/config/local/umalloc.h
+    - src/config/local/nap.h
+    - src/config/local/timer.h
+    - src/config/local/branding.h
+    - src/config/local/serial.h
+    - src/config/local/reboot.h
+    - src/config/local/sanboot.h
+    - src/config/local/fault.h
+    - src/config/local/dhcp.h
+    - src/config/local/sideband.h
+    - src/config/local/entropy.h
+    - src/config/local/crypto.h
+    - src/config/local/usb.h
+    - src/config/local/settings.h
 
 
-  - name: Retrieve iPXE CA
-    get_url:
-      url: "{{ ipxe_ca_url }}"
-      dest: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
+- name: Retrieve iPXE CA
+  ansible.builtin.get_url:
+    url: "{{ ipxe_ca_url }}"
+    dest: "{{ cert_dir }}/{{ ipxe_ca_filename }}"

+ 64 - 64
roles/netbootxyz/tasks/generate_disks_efi.yml

@@ -1,74 +1,74 @@
 ---
 ---
 
 
-  - name: Copy netboot.xyz local EFI iPXE configs
-    copy:
-      src: "ipxe/local/{{ item }}"
-      dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
-    with_items:
-      - colour.h
-      - console.h
-      - crypto.h
+- name: Copy netboot.xyz local EFI iPXE configs
+  ansible.builtin.copy:
+    src: "ipxe/local/{{ item }}"
+    dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
+  with_items:
+    - colour.h
+    - console.h
+    - crypto.h
 
 
-  - name: Copy netboot.xyz general.h.efi iPXE config
-    copy:
-      src: "ipxe/local/general.h.efi"
-      dest: "{{ ipxe_source_dir }}/src/config/local/general.h"
+- name: Copy netboot.xyz general.h.efi iPXE config
+  ansible.builtin.copy:
+    src: "ipxe/local/general.h.efi"
+    dest: "{{ ipxe_source_dir }}/src/config/local/general.h"
 
 
-  - name: Set trust file to ipxe ca
-    set_fact:
-      trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
-    when: not generate_signatures
+- name: Set trust file to ipxe ca
+  ansible.builtin.set_fact:
+    trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
+  when: not generate_signatures
 
 
-  - name: Combine trust files if set
-    set_fact:
-      trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
-    when: generate_signatures | bool
+- name: Combine trust files if set
+  ansible.builtin.set_fact:
+    trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
+  when: generate_signatures | bool
 
 
-  - name: Compile iPXE bootloader for EFI
-    shell: |
-      make clean
-      make EMBED={{ bootloader_filename }} \
-           TRUST={{ trust_files }} \
-           bin-x86_64-efi/ipxe.efi \
-           bin-x86_64-efi/snp.efi \
-           bin-x86_64-efi/snponly.efi
-    args:
-      chdir: "{{ ipxe_source_dir }}/src"
-    tags:
+- name: Compile iPXE bootloader for EFI
+  shell: |
+    make clean
+    make EMBED={{ bootloader_filename }} \
+         TRUST={{ trust_files }} \
+         bin-x86_64-efi/ipxe.efi \
+         bin-x86_64-efi/snp.efi \
+         bin-x86_64-efi/snponly.efi
+  args:
+    chdir: "{{ ipxe_source_dir }}/src"
+  tags:
     - skip_ansible_lint
     - skip_ansible_lint
-    when: ipxe_debug_enabled | bool == false
+  when: ipxe_debug_enabled | bool == false
 
 
-  - name: Compile iPXE bootloader for EFI with debug flags
-    shell: |
-      make clean
-      make EMBED={{ bootloader_filename }} \
-           DEBUG={{ ipxe_debug_options }} \
-           TRUST={{ trust_files }} \
-           bin-x86_64-efi/ipxe.efi \
-           bin-x86_64-efi/snp.efi \
-           bin-x86_64-efi/snponly.efi
-    args:
-      chdir: "{{ ipxe_source_dir }}/src"
-    tags:
+- name: Compile iPXE bootloader for EFI with debug flags
+  shell: |
+    make clean
+    make EMBED={{ bootloader_filename }} \
+         DEBUG={{ ipxe_debug_options }} \
+         TRUST={{ trust_files }} \
+         bin-x86_64-efi/ipxe.efi \
+         bin-x86_64-efi/snp.efi \
+         bin-x86_64-efi/snponly.efi
+  args:
+    chdir: "{{ ipxe_source_dir }}/src"
+  tags:
     - skip_ansible_lint
     - skip_ansible_lint
-    when: ipxe_debug_enabled | bool
-    
-  - name: Copy iPXE EFI builds to http directory
-    copy:
-      src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
-      dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
-      remote_src: True
-    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" }
-      - { src: "bin-x86_64-efi/snponly.efi", dest: "{{ bootloader_filename }}-snponly.efi" }
-    when: bootloader_filename != "netboot.xyz-metal"
+  when: ipxe_debug_enabled | bool
 
 
-  - name: Copy iPXE EFI builds to http directory for Equinix Metal
-    copy:
-      src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
-      dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
-      remote_src: True
-    with_items:
-      - { src: "bin-x86_64-efi/ipxe.efi", dest: "{{ bootloader_filename }}.efi" }
-    when: bootloader_filename == "netboot.xyz-metal"
+- name: Copy iPXE EFI builds to http directory
+  ansible.builtin.copy:
+    src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
+    dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
+    remote_src: true
+  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"}
+    - {src: "bin-x86_64-efi/snponly.efi", dest: "{{ bootloader_filename }}-snponly.efi"}
+  when: bootloader_filename != "netboot.xyz-metal"
+
+- name: Copy iPXE EFI builds to http directory for Equinix Metal
+  ansible.builtin.copy:
+    src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
+    dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
+    remote_src: true
+  with_items:
+    - {src: "bin-x86_64-efi/ipxe.efi", dest: "{{ bootloader_filename }}.efi"}
+  when: bootloader_filename == "netboot.xyz-metal"

+ 18 - 18
roles/netbootxyz/tasks/generate_disks_hybrid.yml

@@ -1,23 +1,23 @@
 ---
 ---
 
 
-  - name: Generate hybrid ISO image
-    shell: |
-      ./util/genfsimg -o {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.iso \
-        -s {{ bootloader_filename }} \
-        {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.efi \
-        {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.lkrn
-    args:
-      chdir: "{{ ipxe_source_dir }}/src"
-    tags:
+- name: Generate hybrid ISO image
+  shell: |
+    ./util/genfsimg -o {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.iso \
+      -s {{ bootloader_filename }} \
+      {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.efi \
+      {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.lkrn
+  args:
+    chdir: "{{ ipxe_source_dir }}/src"
+  tags:
     - skip_ansible_lint
     - skip_ansible_lint
 
 
-  - name: Generate hybrid USB image
-    shell: |
-      ./util/genfsimg -o {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.img \
-        -s {{ bootloader_filename }} \
-        {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.efi \
-        {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.lkrn
-    args:
-      chdir: "{{ ipxe_source_dir }}/src"
-    tags:
+- name: Generate hybrid USB image
+  shell: |
+    ./util/genfsimg -o {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.img \
+      -s {{ bootloader_filename }} \
+      {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.efi \
+      {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.lkrn
+  args:
+    chdir: "{{ ipxe_source_dir }}/src"
+  tags:
     - skip_ansible_lint
     - skip_ansible_lint

+ 66 - 66
roles/netbootxyz/tasks/generate_disks_legacy.yml

@@ -1,82 +1,82 @@
 ---
 ---
 
 
-  - name: Copy netboot.xyz local legacy iPXE configs
-    copy:
-      src: "ipxe/local/{{ item }}"
-      dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
-    with_items:
-      - colour.h
-      - console.h
-      - crypto.h
-      - general.h
+- name: Copy netboot.xyz local legacy iPXE configs
+  ansible.builtin.copy:
+    src: "ipxe/local/{{ item }}"
+    dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
+  with_items:
+    - colour.h
+    - console.h
+    - crypto.h
+    - general.h
 
 
-  - name: Set trust file to ipxe ca
-    set_fact:
-      trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
-    when: not generate_signatures
+- name: Set trust file to ipxe ca
+  ansible.builtin.set_fact:
+    trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
+  when: not generate_signatures
 
 
-  - name: Combine trust args if set
-    set_fact:
-      trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
-    when: generate_signatures | bool
+- name: Combine trust args if set
+  ansible.builtin.set_fact:
+    trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
+  when: generate_signatures | bool
 
 
-  - name: Compile iPXE bootloader for Legacy BIOS
-    shell: |
-      make clean
-      make EMBED={{ bootloader_filename }} \
-           TRUST={{ trust_files }} \
-           bin/ipxe.dsk \
-           bin/ipxe.pdsk \
-           bin/ipxe.lkrn \
-           bin/ipxe.kpxe \
-           bin/undionly.kpxe
-    args:
-      chdir: "{{ ipxe_source_dir }}/src"
-    tags:
+- name: Compile iPXE bootloader for Legacy BIOS
+  shell: |
+    make clean
+    make EMBED={{ bootloader_filename }} \
+         TRUST={{ trust_files }} \
+         bin/ipxe.dsk \
+         bin/ipxe.pdsk \
+         bin/ipxe.lkrn \
+         bin/ipxe.kpxe \
+         bin/undionly.kpxe
+  args:
+    chdir: "{{ ipxe_source_dir }}/src"
+  tags:
     - skip_ansible_lint
     - skip_ansible_lint
-    when: ipxe_debug_enabled | bool == false
+  when: ipxe_debug_enabled | bool == false
 
 
-  - name: Compile iPXE bootloader for Legacy BIOS with debug flags
-    shell: |
-      make clean
-      make EMBED={{ bootloader_filename }} \
-           DEBUG={{ ipxe_debug_options }} \
-           TRUST={{ trust_files }} \
-           bin/ipxe.dsk \
-           bin/ipxe.pdsk \
-           bin/ipxe.lkrn \
-           bin/ipxe.kpxe \
-           bin/undionly.kpxe
-    args:
-      chdir: "{{ ipxe_source_dir }}/src"
-    tags:
+- name: Compile iPXE bootloader for Legacy BIOS with debug flags
+  shell: |
+    make clean
+    make EMBED={{ bootloader_filename }} \
+         DEBUG={{ ipxe_debug_options }} \
+         TRUST={{ trust_files }} \
+         bin/ipxe.dsk \
+         bin/ipxe.pdsk \
+         bin/ipxe.lkrn \
+         bin/ipxe.kpxe \
+         bin/undionly.kpxe
+  args:
+    chdir: "{{ ipxe_source_dir }}/src"
+  tags:
     - skip_ansible_lint
     - skip_ansible_lint
-    when: ipxe_debug_enabled | bool
+  when: ipxe_debug_enabled | bool
 
 
-  - name: Copy iPXE files for Legacy BIOS to http directory
-    copy:
-      src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
-      dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
-      remote_src: True
-    with_items:
+- name: Copy iPXE files for Legacy BIOS to http directory
+  ansible.builtin.copy:
+    src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
+    dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
+    remote_src: true
+  with_items:
     - ".pdsk"
     - ".pdsk"
     - ".dsk"
     - ".dsk"
     - ".lkrn"
     - ".lkrn"
     - ".kpxe"
     - ".kpxe"
-    when: bootloader_filename != "netboot.xyz-metal"
+  when: bootloader_filename != "netboot.xyz-metal"
 
 
-  - name: Copy iPXE files for Legacy BIOS to http directory
-    copy:
-      src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
-      dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
-      remote_src: True
-    with_items:
+- name: Copy iPXE files for Legacy BIOS to http directory
+  ansible.builtin.copy:
+    src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
+    dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
+    remote_src: true
+  with_items:
     - ".kpxe"
     - ".kpxe"
-    when: bootloader_filename == "netboot.xyz-metal"
+  when: bootloader_filename == "netboot.xyz-metal"
 
 
-  - name: Copy undionly.kpxe for Legacy BIOS to http directory
-    copy:
-      src: "{{ ipxe_source_dir }}/src/bin/undionly.kpxe"
-      dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-undionly.kpxe"
-      remote_src: True
-    when: bootloader_filename != "netboot.xyz-metal"
+- name: Copy undionly.kpxe for Legacy BIOS to http directory
+  ansible.builtin.copy:
+    src: "{{ ipxe_source_dir }}/src/bin/undionly.kpxe"
+    dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-undionly.kpxe"
+    remote_src: true
+  when: bootloader_filename != "netboot.xyz-metal"

+ 48 - 48
roles/netbootxyz/tasks/generate_disks_linux.yml

@@ -1,57 +1,57 @@
 ---
 ---
 
 
-  - name: Copy netboot.xyz local legacy iPXE configs
-    copy:
-      src: "ipxe/local/{{ item }}"
-      dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
-    with_items:
-      - colour.h
-      - console.h
-      - crypto.h
+- name: Copy netboot.xyz local legacy iPXE configs
+  ansible.builtin.copy:
+    src: "ipxe/local/{{ item }}"
+    dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
+  with_items:
+    - colour.h
+    - console.h
+    - crypto.h
 
 
-  - name: Copy netboot.xyz general.h.efi iPXE config
-    copy:
-      src: "ipxe/local/general.h.efi"
-      dest: "{{ ipxe_source_dir }}/src/config/local/general.h"
-      
-  - name: Set trust file to ipxe ca
-    set_fact:
-      trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
-    when: not generate_signatures
+- name: Copy netboot.xyz general.h.efi iPXE config
+  ansible.builtin.copy:
+    src: "ipxe/local/general.h.efi"
+    dest: "{{ ipxe_source_dir }}/src/config/local/general.h"
 
 
-  - name: Combine trust args if set
-    set_fact:
-      trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
-    when: generate_signatures | bool
+- name: Set trust file to ipxe ca
+  ansible.builtin.set_fact:
+    trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
+  when: not generate_signatures
 
 
-  - name: Compile iPXE Linux bootloader for Legacy BIOS
-    shell: |
-      make clean
-      make EMBED={{ bootloader_filename }} \
-           TRUST={{ trust_files }} \
-           bin-x86_64-linux/slirp.linux
-    args:
-      chdir: "{{ ipxe_source_dir }}/src"
-    tags:
+- name: Combine trust args if set
+  ansible.builtin.set_fact:
+    trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
+  when: generate_signatures | bool
+
+- name: Compile iPXE Linux bootloader for Legacy BIOS
+  shell: |
+    make clean
+    make EMBED={{ bootloader_filename }} \
+         TRUST={{ trust_files }} \
+         bin-x86_64-linux/slirp.linux
+  args:
+    chdir: "{{ ipxe_source_dir }}/src"
+  tags:
     - skip_ansible_lint
     - skip_ansible_lint
-    when: ipxe_debug_enabled | bool == false
+  when: ipxe_debug_enabled | bool == false
 
 
-  - name: Compile iPXE Linux bootloader for Legacy BIOS with debug flags
-    shell: |
-      make clean
-      make EMBED={{ bootloader_filename }} \
-           DEBUG={{ ipxe_debug_options }} \
-           TRUST={{ trust_files }} \
-           bin-x86_64-linux/slirp.linux
-    args:
-      chdir: "{{ ipxe_source_dir }}/src"
-    tags:
+- name: Compile iPXE Linux bootloader for Legacy BIOS with debug flags
+  shell: |
+    make clean
+    make EMBED={{ bootloader_filename }} \
+         DEBUG={{ ipxe_debug_options }} \
+         TRUST={{ trust_files }} \
+         bin-x86_64-linux/slirp.linux
+  args:
+    chdir: "{{ ipxe_source_dir }}/src"
+  tags:
     - skip_ansible_lint
     - skip_ansible_lint
-    when: ipxe_debug_enabled | bool
+  when: ipxe_debug_enabled | bool
 
 
-  - name: Copy iPXE linux binary for Legacy BIOS to http directory
-    copy:
-      src: "{{ ipxe_source_dir }}/src/bin-x86_64-linux/slirp.linux"
-      dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-linux.bin"
-      remote_src: True
-    when: bootloader_filename != "netboot.xyz-metal"
+- name: Copy iPXE linux binary for Legacy BIOS to http directory
+  ansible.builtin.copy:
+    src: "{{ ipxe_source_dir }}/src/bin-x86_64-linux/slirp.linux"
+    dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-linux.bin"
+    remote_src: true
+  when: bootloader_filename != "netboot.xyz-metal"

+ 56 - 56
roles/netbootxyz/tasks/generate_disks_rpi.yml

@@ -1,66 +1,66 @@
 ---
 ---
-    - name: Install required packages
-      package:
-        name: "{{ item }}"
-        state: present
-      with_items: "{{ pipxe_packages }}"
+- name: Install required packages
+  ansible.builtin.package:
+    name: "{{ item }}"
+    state: present
+  with_items: "{{ pipxe_packages }}"
 
 
-    - name: Check out latest pipxe sources
-      git:
-        repo: "{{ pipxe_repo }}"
-        dest: "{{ pipxe_source_dir }}"
-        version: "{{ pipxe_branch }}"
-        force: true
-        recursive: yes
-      register: pipxe_git_checkout
+- name: Check out latest pipxe sources
+  ansible.builtin.git:
+    repo: "{{ pipxe_repo }}"
+    dest: "{{ pipxe_source_dir }}"
+    version: "{{ pipxe_branch }}"
+    force: true
+    recursive: true
+  register: pipxe_git_checkout
 
 
-    - name: Copy iPXE Bootloader template to iPXE source directory
-      template:
-        src: "disks/{{ bootloader_filename }}.j2"
-        dest: "{{ pipxe_source_dir }}/ipxe/src/{{ bootloader_filename }}"
+- name: Copy iPXE Bootloader template to iPXE source directory
+  ansible.builtin.template:
+    src: "disks/{{ bootloader_filename }}.j2"
+    dest: "{{ pipxe_source_dir }}/ipxe/src/{{ bootloader_filename }}"
 
 
-    - name: Copy netboot.xyz local EFI iPXE configs
-      copy:
-        src: "ipxe/local/{{ item }}"
-        dest: "{{ pipxe_source_dir }}/ipxe/src/config/local/{{ item }}"
-      with_items:
-        - colour.h
-        - console.h
-        - crypto.h
+- name: Copy netboot.xyz local EFI iPXE configs
+  ansible.builtin.copy:
+    src: "ipxe/local/{{ item }}"
+    dest: "{{ pipxe_source_dir }}/ipxe/src/config/local/{{ item }}"
+  with_items:
+    - colour.h
+    - console.h
+    - crypto.h
 
 
-    - name: Copy netboot.xyz general.h.efi iPXE config
-      copy:
-        src: "ipxe/local/general.h.efi"
-        dest: "{{ pipxe_source_dir }}/ipxe/src/config/local/general.h"
+- name: Copy netboot.xyz general.h.efi iPXE config
+  ansible.builtin.copy:
+    src: "ipxe/local/general.h.efi"
+    dest: "{{ pipxe_source_dir }}/ipxe/src/config/local/general.h"
 
 
-    - name: Set trust file to ipxe ca
-      set_fact:
-        trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
-      when: not generate_signatures
+- name: Set trust file to ipxe ca
+  ansible.builtin.set_fact:
+    trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
+  when: not generate_signatures
 
 
-    - name: Combine trust files if set
-      set_fact:
-        trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
-      when: generate_signatures | bool
+- name: Combine trust files if set
+  ansible.builtin.set_fact:
+    trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
+  when: generate_signatures | bool
 
 
-    - name: Copy Makefile template into pipxe
-      template:
-        src: pipxe/Makefile-rpi4.j2
-        dest: "{{ pipxe_source_dir }}/Makefile"
+- name: Copy Makefile template into pipxe
+  ansible.builtin.template:
+    src: pipxe/Makefile-rpi4.j2
+    dest: "{{ pipxe_source_dir }}/Makefile"
 
 
-    - name: Compile iPXE bootloader for RPI build
-      shell: |
-        make
-      args:
-        chdir: "{{ pipxe_source_dir }}"
-      tags:
-      - skip_ansible_lint
+- name: Compile iPXE bootloader for RPI build
+  shell: |
+    make
+  args:
+    chdir: "{{ pipxe_source_dir }}"
+  tags:
+    - skip_ansible_lint
 
 
-    - name: Copy iPXE RPI builds to http directory
-      copy:
-        src: "{{ pipxe_source_dir }}/{{ item.src }}"
-        dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
-        remote_src: True
-      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" }
+- name: Copy iPXE RPI builds to http directory
+  ansible.builtin.copy:
+    src: "{{ pipxe_source_dir }}/{{ item.src }}"
+    dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
+    remote_src: true
+  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"}

+ 66 - 66
roles/netbootxyz/tasks/generate_menus.yml

@@ -1,81 +1,81 @@
 ---
 ---
-  - name: Combine overrides with release defaults
-    set_fact:
-      _releases: "{{ releases|combine(release_overrides, recursive=True) }}"
-    when: release_overrides is defined
+- name: Combine overrides with release defaults
+  ansible.builtin.set_fact:
+    _releases: "{{ releases|combine(release_overrides, recursive=True) }}"
+  when: release_overrides is defined
 
 
-  - name: Set releases with user overrides
-    set_fact:
-      releases: "{{ _releases }}"
-    when: release_overrides is defined
+- name: Set releases with user overrides
+  ansible.builtin.set_fact:
+    releases: "{{ _releases }}"
+  when: release_overrides is defined
 
 
-  # PC BIOS utilities
-  - name: Combine overrides with utilitiespcbios64 defaults
-    set_fact:
-      _utilitiespcbios64: "{{ utilitiespcbios64|combine(utilitiespcbios64_overrides, recursive=True) }}"
-    when: utilitiespcbios64_overrides is defined
+# PC BIOS utilities
+- name: Combine overrides with utilitiespcbios64 defaults
+  ansible.builtin.set_fact:
+    _utilitiespcbios64: "{{ utilitiespcbios64|combine(utilitiespcbios64_overrides, recursive=True) }}"
+  when: utilitiespcbios64_overrides is defined
 
 
-  - name: Set utilitypcbios64 with user overrides
-    set_fact:
-      utilitiespcbios64: "{{ _utilitiespcbios64 }}"
-    when: utilitiespcbios64_overrides is defined
+- name: Set utilitypcbios64 with user overrides
+  ansible.builtin.set_fact:
+    utilitiespcbios64: "{{ _utilitiespcbios64 }}"
+  when: utilitiespcbios64_overrides is defined
 
 
-  - name: Combine overrides with utilitiespcbios32 defaults
-    set_fact:
-      _utilitiespcbios32: "{{ utilitiespcbios32|combine(utilitiespcbios32_overrides, recursive=True) }}"
-    when: utilitiespcbios32_overrides is defined
+- name: Combine overrides with utilitiespcbios32 defaults
+  ansible.builtin.set_fact:
+    _utilitiespcbios32: "{{ utilitiespcbios32|combine(utilitiespcbios32_overrides, recursive=True) }}"
+  when: utilitiespcbios32_overrides is defined
 
 
-  - name: Set utilitypcbios32 with user overrides
-    set_fact:
-      utilitiespcbios32: "{{ _utilitiespcbios32 }}"
-    when: utilitiespcbios32_overrides is defined
+- name: Set utilitypcbios32 with user overrides
+  ansible.builtin.set_fact:
+    utilitiespcbios32: "{{ _utilitiespcbios32 }}"
+  when: utilitiespcbios32_overrides is defined
 
 
-  # EFI utilities
-  - name: Combine overrides with utilitiesefi defaults
-    set_fact:
-      _utilitiesefi: "{{ utilitiesefi|combine(utilitiesefi_overrides, recursive=True) }}"
-    when: utilitiesefi_overrides is defined
+# EFI utilities
+- name: Combine overrides with utilitiesefi defaults
+  ansible.builtin.set_fact:
+    _utilitiesefi: "{{ utilitiesefi|combine(utilitiesefi_overrides, recursive=True) }}"
+  when: utilitiesefi_overrides is defined
 
 
-  - name: Set utilityefi with user overrides
-    set_fact:
-      utilitiesefi: "{{ _utilitiesefi }}"
-    when: utilitiesefi_overrides is defined
+- name: Set utilityefi with user overrides
+  ansible.builtin.set_fact:
+    utilitiesefi: "{{ _utilitiesefi }}"
+  when: utilitiesefi_overrides is defined
 
 
-  - name: Generate directories
-    file:
-      path: "{{ netbootxyz_root }}"
-      state: directory
+- name: Generate directories
+  ansible.builtin.file:
+    path: "{{ netbootxyz_root }}"
+    state: directory
 
 
-  - name: Set menu version
-    set_fact:
-      upstream_version: "{{ boot_version }}"
-    when:
-      - generate_version_file | bool
+- name: Set menu version
+  ansible.builtin.set_fact:
+    upstream_version: "{{ boot_version }}"
+  when:
+    - generate_version_file | bool
 
 
-  - name: Generate version.ipxe for upstream
-    template:
-      src: "version.ipxe.j2"
-      dest: "{{ netbootxyz_root }}/version.ipxe"
-    when:
-      - generate_version_file | bool
+- name: Generate version.ipxe for upstream
+  ansible.builtin.template:
+    src: "version.ipxe.j2"
+    dest: "{{ netbootxyz_root }}/version.ipxe"
+  when:
+    - generate_version_file | bool
 
 
-  - name: Generate netboot.xyz source files templates
-    template:
-      src: "{{ item.src }}"
-      dest: "{{ netbootxyz_root }}/{{ item.path | regex_replace('.j2','') }}"
-    with_filetree: "templates/menu/"
-    when: item.state == "file"
-    tags:
+- name: Generate netboot.xyz source files templates
+  template:
+    src: "{{ item.src }}"
+    dest: "{{ netbootxyz_root }}/{{ item.path | regex_replace('.j2','') }}"
+  with_filetree: "templates/menu/"
+  when: item.state == "file"
+  tags:
     - skip_ansible_lint
     - skip_ansible_lint
 
 
-  - name: Generate local-vars.ipxe if enabled
-    template:
-      src: "local-vars.ipxe.j2"
-      dest: "{{ netbootxyz_root }}/local-vars.ipxe"
-    when:
-      - generate_local_vars | bool
+- name: Generate local-vars.ipxe if enabled
+  ansible.builtin.template:
+    src: "local-vars.ipxe.j2"
+    dest: "{{ netbootxyz_root }}/local-vars.ipxe"
+  when:
+    - generate_local_vars | bool
 
 
-  - name: Retrieve pciids.ipxe
-    get_url:
-      url: "{{ pciids_url }}"
-      dest: "{{ netbootxyz_root }}/pciids.ipxe"
+- name: Retrieve pciids.ipxe
+  ansible.builtin.get_url:
+    url: "{{ pciids_url }}"
+    dest: "{{ netbootxyz_root }}/pciids.ipxe"

+ 15 - 15
roles/netbootxyz/tasks/generate_menus_custom.yml

@@ -1,18 +1,18 @@
 ---
 ---
 
 
-  - name: Generate directories
-    file:
-      path: "{{ item }}"
-      state: directory
-    with_items:
-      - "{{ custom_templates_dir }}"
-      - "{{ netbootxyz_root }}/custom"
+- name: Generate directories
+  ansible.builtin.file:
+    path: "{{ item }}"
+    state: directory
+  with_items:
+    - "{{ custom_templates_dir }}"
+    - "{{ netbootxyz_root }}/custom"
 
 
-  - name: Generate custom user menu templates
-    template:
-      src: "{{ item.src }}"
-      dest: "{{ netbootxyz_root }}/custom/{{ item.path | regex_replace('.j2','') }}"
-    with_filetree: "{{ custom_templates_dir }}"
-    when: item.state == "file"
-    tags:
-    - skip_ansible_lint
+- name: Generate custom user menu templates
+  template:
+    src: "{{ item.src }}"
+    dest: "{{ netbootxyz_root }}/custom/{{ item.path | regex_replace('.j2','') }}"
+  with_filetree: "{{ custom_templates_dir }}"
+  when: item.state == "file"
+  tags:
+    - skip_ansible_lint

+ 23 - 23
roles/netbootxyz/tasks/generate_signatures.yml

@@ -1,26 +1,26 @@
 ---
 ---
-  - name: Gather list of source files
-    command: ls {{ netbootxyz_root }}
-    register: source_files
-    tags:
-      - skip_ansible_lint
+- name: Gather list of source files
+  command: ls {{ netbootxyz_root }}
+  register: source_files
+  tags:
+    - skip_ansible_lint
 
 
-  - name: Create directories for signatures
-    file:
-      path: "{{ item }}"
-      state: directory
-    with_items:
-      - "{{ sigs_dir }}"
+- name: Create directories for signatures
+  ansible.builtin.file:
+    path: "{{ item }}"
+    state: directory
+  with_items:
+    - "{{ sigs_dir }}"
 
 
-  - name: Generate signatures for source files
-    shell: |
-      openssl cms -sign -binary -noattr -in {{ netbootxyz_root }}/{{ item }} \
-      -signer {{ codesign_cert_filename }} -inkey {{ codesign_key_filename }} -certfile {{ cert_file_filename }} -outform DER \
-      -out {{ sigs_dir }}/{{ item }}.sig
-    args:
-      chdir: "{{ cert_dir }}"
-      warn: false
-    with_items:
-      - "{{ source_files.stdout_lines }}"
-    tags:
-    - skip_ansible_lint
+- name: Generate signatures for source files
+  shell: |
+    openssl cms -sign -binary -noattr -in {{ netbootxyz_root }}/{{ item }} \
+    -signer {{ codesign_cert_filename }} -inkey {{ codesign_key_filename }} -certfile {{ cert_file_filename }} -outform DER \
+    -out {{ sigs_dir }}/{{ item }}.sig
+  args:
+    chdir: "{{ cert_dir }}"
+    warn: false
+  with_items:
+    - "{{ source_files.stdout_lines }}"
+  tags:
+    - skip_ansible_lint

+ 13 - 13
roles/netbootxyz/tasks/main.yml

@@ -1,24 +1,24 @@
 ---
 ---
-  - include_tasks: generate_menus.yml
-    when:
+- include_tasks: generate_menus.yml
+  when:
     - generate_menus | default(true) | bool
     - generate_menus | default(true) | bool
 
 
-  - include_tasks: generate_menus_custom.yml
-    when:
+- include_tasks: generate_menus_custom.yml
+  when:
     - custom_generate_menus | default(false) | bool
     - custom_generate_menus | default(false) | bool
 
 
-  - include_tasks: generate_disks.yml
-    with_items:
+- include_tasks: generate_disks.yml
+  with_items:
     - "{{ bootloader_disks }}"
     - "{{ bootloader_disks }}"
-    loop_control:
-      loop_var: bootloader_file
-    when:
+  loop_control:
+    loop_var: bootloader_file
+  when:
     - generate_disks | default(true) | bool
     - generate_disks | default(true) | bool
 
 
-  - include_tasks: generate_checksums.yml
-    when:
+- include_tasks: generate_checksums.yml
+  when:
     - generate_checksums | default(true) | bool
     - generate_checksums | default(true) | bool
 
 
-  - include_tasks: generate_signatures.yml
-    when:
+- include_tasks: generate_signatures.yml
+  when:
     - generate_signatures | default(false) | bool
     - generate_signatures | default(false) | bool

+ 1 - 1
script/netbootxyz-overrides.yml

@@ -20,4 +20,4 @@ ipxe_ca_url: http://ca.ipxe.org/ca.crt
 ipxe_ca_filename: ca-ipxe-org.crt
 ipxe_ca_filename: ca-ipxe-org.crt
 codesign_cert_filename: codesign.crt
 codesign_cert_filename: codesign.crt
 codesign_key_filename: codesign.key
 codesign_key_filename: codesign.key
-cert_file_filename : ca-netboot-xyz.crt
+cert_file_filename: ca-netboot-xyz.crt

+ 14 - 14
user_overrides.yml

@@ -7,38 +7,38 @@ generate_checksums: true
 generate_local_vars: true
 generate_local_vars: true
 
 
 # set desired site name
 # set desired site name
-#site_name: mysitename.com
+# site_name: mysitename.com
 
 
 # set desired boot domain
 # set desired boot domain
-#boot_domain: boot.mysitename.com
+# boot_domain: boot.mysitename.com
 
 
 # set boot version
 # set boot version
-#boot_version: "2.x"
+# boot_version: "2.x"
 
 
-#bootloader_tftp_enabled: false
-#bootloader_https_enabled: true
-#bootloader_http_enabled: true
+# bootloader_tftp_enabled: false
+# bootloader_https_enabled: true
+# bootloader_http_enabled: true
 
 
 # set release overrides from standard netboot.xyz defaults
 # set release overrides from standard netboot.xyz defaults
-#release_overrides:
-#  alpinelinux:
-#    name: "Alpine Linux"
-#  fedora:
-#    mirror: "mirrors.kernel.org"
+# release_overrides:
+#   alpinelinux:
+#     name: "Alpine Linux"
+#   fedora:
+#     mirror: "mirrors.kernel.org"
 
 
 # set utilitiesefi_overrides from standard netboot.xyz defaults for EFI utilities
 # set utilitiesefi_overrides from standard netboot.xyz defaults for EFI utilities
-#utilitiesefi_overrides:
+# utilitiesefi_overrides:
 #  supergrub:
 #  supergrub:
 #    enabled: false
 #    enabled: false
 
 
 # set utilities_overrides from standard netboot.xyz defaults for PC BIOS utilities
 # set utilities_overrides from standard netboot.xyz defaults for PC BIOS utilities
-#utilitiespcbios64_overrides:
+# utilitiespcbios64_overrides:
 #  supergrub:
 #  supergrub:
 #    enabled: false
 #    enabled: false
 
 
 # set licensed media locations in boot.cfg
 # set licensed media locations in boot.cfg
 # win_base_url:
 # win_base_url:
-# rhel_base_url: 
+# rhel_base_url:
 
 
 early_menu_enabled: false
 early_menu_enabled: false
 early_menu_contents: |
 early_menu_contents: |