summaryrefslogtreecommitdiff
path: root/roles/vm/guest/install/tasks/installer-debian.yml
blob: ab7342da7ad4345abf1c65d8114b65740ec34f42 (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:
    debian_preseed_initrd: "{{ tmpdir.path }}/initrd.gz"
    debian_preseed_tmpdir: "{{ tmpdir.path }}"
    debian_preseed_virtual_machine: yes
    debian_preseed_force_net_ifnames_policy: path
    debian_preseed_no_netplan: yes
    install_interface: enp1s1
  import_role:
    name: installer/debian/preseed