diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-07-20 22:51:24 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-07-20 22:51:24 +0200 |
commit | a367366bfe3397b52b1fa286be8877cd23d2b657 (patch) | |
tree | 92947ad5096a378a10cb0347a4d04f5504d7f4a2 /roles/installer/debian | |
parent | make debian installer fetch more generic (diff) |
simpler pressed initrd handling
Diffstat (limited to 'roles/installer/debian')
-rw-r--r-- | roles/installer/debian/preseed/defaults/main.yml | 2 | ||||
-rw-r--r-- | roles/installer/debian/preseed/tasks/main.yml | 8 | ||||
-rw-r--r-- | roles/installer/debian/usb/tasks/main.yml | 14 |
3 files changed, 9 insertions, 15 deletions
diff --git a/roles/installer/debian/preseed/defaults/main.yml b/roles/installer/debian/preseed/defaults/main.yml index b5aad35c..078b5448 100644 --- a/roles/installer/debian/preseed/defaults/main.yml +++ b/roles/installer/debian/preseed/defaults/main.yml @@ -1,5 +1,5 @@ --- -# preseed_orig_initrd +# preseed_initrd # preseed_tmpdir: # preseed_force_net_ifnames_policy: path diff --git a/roles/installer/debian/preseed/tasks/main.yml b/roles/installer/debian/preseed/tasks/main.yml index 49d08c8b..3c45001f 100644 --- a/roles/installer/debian/preseed/tasks/main.yml +++ b/roles/installer/debian/preseed/tasks/main.yml @@ -1,10 +1,4 @@ --- -- name: Copy initramfs into position - copy: - remote_src: yes - src: "{{ preseed_orig_initrd }}" - dest: "{{ preseed_tmpdir }}/initrd.{{ install_hostname }}.gz" - - name: Generate preseed file template: src: "preseed_{{ hostvars[install_hostname].preseed_template_name | default(install_distro + '-' + install_codename) }}.cfg.j2" @@ -42,7 +36,7 @@ NamePolicy={{ preseed_force_net_ifnames_policy }} - name: Inject files into initramfs - shell: cpio -H newc -o | gzip -9 >> 'initrd.{{ install_hostname }}.gz' + shell: cpio -H newc -o | gzip -9 >> '{{ preseed_initrd }}' args: chdir: "{{ preseed_tmpdir }}" stdin: | diff --git a/roles/installer/debian/usb/tasks/main.yml b/roles/installer/debian/usb/tasks/main.yml index 40846f13..7e603ed6 100644 --- a/roles/installer/debian/usb/tasks/main.yml +++ b/roles/installer/debian/usb/tasks/main.yml @@ -28,18 +28,18 @@ state: directory register: tmpdir - - name: generate pressed file + - name: copy the original initramfs to the usb drive + copy: + src: "{{ debian_installer_target_dir }}/initrd.gz" + dest: "{{ usb_install_path }}/initrd.{{ install_hostname }}.gz" + + - name: generate host specific initial ramdisk vars: - preseed_orig_initrd: "{{ debian_installer_target_dir }}/initrd.gz" + preseed_initrd: "{{ usb_install_path }}/initrd.{{ install_hostname }}.gz" preseed_tmpdir: "{{ tmpdir.path }}" import_role: name: installer/debian/preseed - - name: copy the preseed initramfs to the usb drive - copy: - src: "{{ tmpdir.path }}/initrd.{{ install_hostname }}.gz" - dest: "{{ usb_install_path }}/initrd.{{ install_hostname }}.gz" - always: - name: cleanup temporary workdir when: tmpdir.path is defined |