58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
---
|
|
- name: "Find linux kernel images in '{{ fai_dir_nfsroot_boot }}'"
|
|
ansible.builtin.find:
|
|
paths: "{{ fai_dir_nfsroot_boot }}"
|
|
patterns: "vmlinuz-*"
|
|
register: fai_live_vmlinuz
|
|
tags:
|
|
- ipxe
|
|
|
|
- name: "Find linux initial ram-disks in '{{ fai_dir_nfsroot_boot }}'"
|
|
ansible.builtin.find:
|
|
paths: "{{ fai_dir_nfsroot_boot }}"
|
|
patterns: "initrd.img-*"
|
|
register: fai_live_initrd
|
|
tags:
|
|
- ipxe
|
|
|
|
- name: "Extract basenames of 'fai_live_vmlinuz' 'fai_live_initrd'"
|
|
ansible.builtin.set_fact:
|
|
#fai_live_vmlinuz: "{{ fai_live_vmlinuz.files[0].path |regex_replace('.*/', '') }}"
|
|
#fai_live_initrd: "{{ fai_live_initrd.files[0].path |regex_replace('.*/', '') }}"
|
|
fai_live_vmlinuz: "{{ fai_live_vmlinuz.files[0].path | basename }}"
|
|
fai_live_initrd: "{{ fai_live_initrd.files[0].path | basename }}"
|
|
tags:
|
|
- ipxe
|
|
|
|
- name: "Copy linux kernel and initrd to ipxe root '{{ ipxe_dir_download }}'"
|
|
become: true
|
|
ansible.builtin.copy:
|
|
src: "{{ fai_dir_nfsroot_boot + '/' + item }}"
|
|
dest: "{{ ipxe_dir_download + '/' + item }}"
|
|
owner: root
|
|
group: root
|
|
mode: '0544'
|
|
remote_src: true
|
|
with_items:
|
|
- "{{ fai_live_vmlinuz }}"
|
|
- "{{ fai_live_initrd }}"
|
|
tags:
|
|
- ipxe
|
|
|
|
- name: "Copy additional files to '{{ ipxe_dir_download }}'"
|
|
become: true
|
|
ansible.builtin.copy:
|
|
src: "{{ item.value.files + '/' }}"
|
|
dest: "{{ ipxe_dir_download + '/' + item.key }}"
|
|
mode: push
|
|
force: true
|
|
recursive: true
|
|
loop: "{{ ipxe_additional_entries
|
|
|dict2items }}"
|
|
when:
|
|
- item.value.files is defined
|
|
- item.value.files|length
|
|
tags:
|
|
- ipxe
|
|
- copy_additional_files
|