You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.4 KiB

---
- name: Install prerequisites for compilation
dnf:
state: installed
name:
- xz-devel
become: yes
delegate_to: localhost
- name: Get the latest ipxe sources
git:
repo: '{{ ipxe_repo }}'
dest: '{{ tmp_dir }}/ipxe'
delegate_to: localhost
- name: Clean the repository of artifacts
shell: |
git clean -fx
git reset HEAD --hard
args:
chdir: '{{ tmp_dir }}/ipxe'
delegate_to: localhost
- name: Create iPXE folders for our targets
file:
state: directory
path: '{{ tmp_dir }}/ipxe/src/config/local/{{ item }}'
loop:
- efi
- undionly
delegate_to: localhost
- name: Drop config files/embeds
copy:
src: '{{ role_path }}/files/{{ item.src }}'
dest: '{{ tmp_dir }}/ipxe/src/{{ item.dest|default("") }}'
loop:
- src: efi.h
dest: config/local/efi/general.h
- src: undionly.h
dest: config/local/undionly/general.h
- src: pxe_inv.ipxe
- src: harmroute.crt
delegate_to: localhost
- name: Make iPXE targets
shell: |
{% if target in make_config.keys() %}
make {{ target }} EMBED=pxe_inv.ipxe CERT=harmroute.crt TRUST=harmroute.crt CONFIG={{ make_config[target] }} || exit 1
{% else %}
make {{ target }} EMBED=pxe_inv.ipxe CERT=harmroute.crt TRUST=harmroute.crt || exit 1
{% endif %}
loop: '{{ make_targets }}'
loop_control:
loop_var: target
args:
chdir: '{{ tmp_dir }}/ipxe/src'
delegate_to: localhost