summaryrefslogtreecommitdiff
path: root/roles/vm/guest
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-07-20 22:34:01 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-07-20 22:34:01 +0200
commit7ff35ec95420023d323e394162cd124029ea7161 (patch)
tree773e57a25d74490da230c4a605a978d76d9c6c51 /roles/vm/guest
parentriot is now called element (diff)
make debian installer fetch more generic
Diffstat (limited to 'roles/vm/guest')
-rw-r--r--roles/vm/guest/define/templates/libvirt-domain.xml.j22
-rw-r--r--roles/vm/guest/install/tasks/installer-debian.yml8
2 files changed, 8 insertions, 2 deletions
diff --git a/roles/vm/guest/define/templates/libvirt-domain.xml.j2 b/roles/vm/guest/define/templates/libvirt-domain.xml.j2
index ba0dcd5a..f2b0cfe8 100644
--- a/roles/vm/guest/define/templates/libvirt-domain.xml.j2
+++ b/roles/vm/guest/define/templates/libvirt-domain.xml.j2
@@ -7,7 +7,7 @@
<type arch='x86_64' machine='pc-0.12'>hvm</type>
{% if vm_define_installer %}
{% if install_distro == 'debian' or install_distro == 'ubuntu' %}
- <kernel>{{ installer_base_path }}/{{ install_distro }}-{{ install_codename }}/{{ hostvars[install_hostname].install_cooked.arch | default('amd64') }}-netboot/linux</kernel>
+ <kernel>{{ installer_tmpdir }}/linux</kernel>
<initrd>{{ installer_tmpdir }}/initrd.{{ install_hostname }}.gz</initrd>
<cmdline>console=ttyS0,115200n8 DEBCONF_DEBUG=5</cmdline>
<boot dev='hd'/>
diff --git a/roles/vm/guest/install/tasks/installer-debian.yml b/roles/vm/guest/install/tasks/installer-debian.yml
index 32662f8c..c89a1cdf 100644
--- a/roles/vm/guest/install/tasks/installer-debian.yml
+++ b/roles/vm/guest/install/tasks/installer-debian.yml
@@ -10,7 +10,7 @@
- name: generate host specific initial ramdisk
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 }}"
preseed_virtual_machine: yes
preseed_force_net_ifnames_policy: path
@@ -18,3 +18,9 @@
install_interface: enp1s1
import_role:
name: installer/debian/preseed
+
+- name: copy installer kernel image to temporary installer directory
+ copy:
+ remote_src: yes
+ src: "{{ debian_installer_target_dir }}/linux"
+ dest: "{{ tmpdir.path }}/linux