summaryrefslogtreecommitdiff
path: root/roles/vm/guest/install/tasks/installer-debian.yml
blob: 3373b2d1b6477d6e8534c165ef5edf554a453afc (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
32
---
## 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.name].installer_base_path }}"
    debian_installer_distro: "{{ install_distro }}"
    debian_installer_codename: "{{ install_codename }}"
    debian_installer_arch: "{{ install.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
    debian_preseed_poweroff_when_done: yes
    install_interface: enp16s0
  import_role:
    name: installer/debian/preseed