summaryrefslogtreecommitdiff
path: root/roles/vm/guest/install/tasks/installer-debian.yml
blob: 9e484b8868f1df0ffdf95c3a30c0ceb982b5c6f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
## this file is sourced using import_task and all task are therefore delegated to the vm-host
- name: fetch debian installer files
  vars:
    installer_base_path: "{{ hostvars[vm_host_cooked.name].installer_base_path }}"
    debian_installer_distro: "{{ install_distro }}"
    debian_installer_codename: "{{ install_codename }}"
    debian_installer_arch: "{{ install_cooked.arch | default('amd64') }}"
    debian_installer_variant: netboot
  import_role:
    name: installer/debian/fetch

- name: copy the installer files to the temporary installer directory
  loop:
  - linux
  - initrd.gz
  copy:
    remote_src: yes
    src: "{{ debian_installer_target_dir }}/{{ item }}"
    dest: "{{ tmpdir.path }}/{{ item }}"

- name: generate host specific initial ramdisk
  vars:
    preseed_initrd: "{{ tmpdir.path }}/initrd.gz"
    preseed_tmpdir: "{{ tmpdir.path }}"
    preseed_virtual_machine: yes
    preseed_force_net_ifnames_policy: path
    preseed_no_netplan: yes
    install_interface: enp1s1
  import_role:
    name: installer/debian/preseed