From 7ff35ec95420023d323e394162cd124029ea7161 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 20 Jul 2020 22:34:01 +0200 Subject: make debian installer fetch more generic --- roles/installer/debian/usb/tasks/main.yml | 38 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'roles/installer/debian/usb') diff --git a/roles/installer/debian/usb/tasks/main.yml b/roles/installer/debian/usb/tasks/main.yml index 6220b02b..40846f13 100644 --- a/roles/installer/debian/usb/tasks/main.yml +++ b/roles/installer/debian/usb/tasks/main.yml @@ -11,18 +11,18 @@ that: usb_install_mountpoint.stat.exists msg: the path to the usb drive does not exist -- block: - - name: download installer - vars: - debian_installer_distro: "{{ install_distro }}" - debian_installer_codename: "{{ install_codename }}" - debian_installer_arch: "{{ install.arch | default('amd64') }}" - debian_installer_variant: netboot - run_once: true - import_role: - role: installer/debian/fetch +- name: download installer + vars: + debian_installer_distro: "{{ install_distro }}" + debian_installer_codename: "{{ install_codename }}" + debian_installer_arch: "{{ install.arch | default('amd64') }}" + debian_installer_variant: netboot + run_once: true + import_role: + role: installer/debian/fetch - - name: Create temporary workdir +- block: + - name: create temporary workdir tempfile: prefix: "usb-install.{{ install_hostname }}." state: directory @@ -30,30 +30,30 @@ - name: generate pressed file vars: - preseed_orig_initrd: "{{ installer_base_path }}/{{ install_distro }}-{{ install_codename }}/{{ hostvars[install_hostname].install_cooked.arch | default('amd64') }}-netboot/initrd.gz" + preseed_orig_initrd: "{{ debian_installer_target_dir }}/initrd.gz" preseed_tmpdir: "{{ tmpdir.path }}" import_role: name: installer/debian/preseed - - name: Copy the preseed initramfs to the usb drive + - 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 + - name: cleanup temporary workdir when: tmpdir.path is defined file: path: "{{ tmpdir.path }}" state: absent -- name: Copy linux kernel image to the USB drive +- name: copy linux kernel image to the USB drive run_once: true copy: - src: "{{ global_cache_dir }}/debian-installer/{{ install_distro }}-{{ install_codename }}/{{ install.arch | default('amd64') }}-{{ debian_installer_variant }}/linux" + src: "{{ debian_installer_target_dir }}/linux" dest: "{{ usb_install_path }}/" -- name: Generate syslinux configuration for BIOS boot +- name: generate syslinux configuration for BIOS boot run_once: true vars: syslinux_base_path: "" @@ -67,7 +67,7 @@ path: "{{ usb_install_path }}/EFI/boot" state: directory -- name: Generate syslinux configuration for UEFI boot +- name: generate syslinux configuration for UEFI boot run_once: true vars: syslinux_base_path: "../../" @@ -75,7 +75,7 @@ src: syslinux.cfg.j2 dest: "{{ usb_install_path }}/EFI/boot/syslinux.cfg" -- name: Make the USB disk bootable +- name: make the USB disk bootable pause: seconds: 0 prompt: | -- cgit v1.2.3