summaryrefslogtreecommitdiff
path: root/roles/installer
diff options
context:
space:
mode:
Diffstat (limited to 'roles/installer')
-rw-r--r--roles/installer/debian/base/defaults/main.yml2
-rw-r--r--roles/installer/debian/base/tasks/main.yml6
-rw-r--r--roles/installer/debian/usb/tasks/main.yml33
3 files changed, 37 insertions, 4 deletions
diff --git a/roles/installer/debian/base/defaults/main.yml b/roles/installer/debian/base/defaults/main.yml
index 39fc787d..fe6d880d 100644
--- a/roles/installer/debian/base/defaults/main.yml
+++ b/roles/installer/debian/base/defaults/main.yml
@@ -1,4 +1,4 @@
-distros:
+debian_installer_distros:
- distro: debian
codename: stretch
arch:
diff --git a/roles/installer/debian/base/tasks/main.yml b/roles/installer/debian/base/tasks/main.yml
index 8ce494ae..a7000f3c 100644
--- a/roles/installer/debian/base/tasks/main.yml
+++ b/roles/installer/debian/base/tasks/main.yml
@@ -1,5 +1,5 @@
- name: prepare directories for installer images
- loop: "{{ distros | subelements('arch') }}"
+ loop: "{{ debian_installer_distros | subelements('arch') }}"
loop_control:
label: "{{ item.0.distro }}/{{ item.0.codename }} {{ item.1 }}"
file:
@@ -7,7 +7,7 @@
state: directory
- name: download installer kernel images
- loop: "{{ distros | subelements('arch') }}"
+ loop: "{{ debian_installer_distros | subelements('arch') }}"
loop_control:
label: "{{ item.0.distro }}/{{ item.0.codename }} {{ item.1 }}"
get_url:
@@ -17,7 +17,7 @@
force: "{{ debian_installer_force_download }}"
- name: download installer initrd.gz
- loop: "{{ distros | subelements('arch') }}"
+ loop: "{{ debian_installer_distros | subelements('arch') }}"
loop_control:
label: "{{ item.0.distro }}/{{ item.0.codename }} {{ item.1 }}"
get_url:
diff --git a/roles/installer/debian/usb/tasks/main.yml b/roles/installer/debian/usb/tasks/main.yml
new file mode 100644
index 00000000..60c2dfd5
--- /dev/null
+++ b/roles/installer/debian/usb/tasks/main.yml
@@ -0,0 +1,33 @@
+---
+- block:
+ - name: download installer
+ vars:
+ debian_installer_distros:
+ - distro: "{{ install_distro }}"
+ codename: "{{ install_codename }}"
+ arch:
+ - "{{ install.arch | default('amd64') }}"
+ import_role:
+ role: installer/debian/base
+
+ - name: Create temporary workdir
+ tempfile:
+ state: directory
+ register: tmpdir
+
+ - name: generate pressed file
+ vars:
+ preseed_tmpdir: "{{ tmpdir.path }}"
+ import_role:
+ name: installer/debian/preseed
+
+ - name: Copy the preseed initramfs to the artifacts directory
+ copy:
+ src: "{{ tmpdir.path }}/initrd.preseed.gz"
+ dest: "{{ artifacts_dir }}/"
+
+ always:
+ - name: Cleanup temporary workdir
+ file:
+ path: "{{ tmpdir.path }}"
+ state: absent