summaryrefslogtreecommitdiffstats
path: root/slx-builder/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'slx-builder/tasks/main.yml')
-rw-r--r--slx-builder/tasks/main.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/slx-builder/tasks/main.yml b/slx-builder/tasks/main.yml
new file mode 100644
index 0000000..fe64b37
--- /dev/null
+++ b/slx-builder/tasks/main.yml
@@ -0,0 +1,34 @@
+---
+- include: tasks/distro.yml
+
+- name: Install dependencies for OpenSLX dracut module
+ package: name={{ item }} state=installed
+ with_items: "{{ pkgnames }}"
+
+- name: Checkout repository of OpenSLX dracut module
+ git:
+ repo: "{{ gitsource }}"
+ dest: "{{ gittarget }}"
+ depth: 1
+
+- include: tasks/dnbd3-fixes.yml
+
+- name: Build initramfs with dracut
+ shell: "{{ gittarget }}/builder/build-initramfs.sh -s -d -p {{ gittarget }}/initramfs - --add 'kexec-reboot'"
+ args:
+ creates: "{{ gittarget }}/initramfs"
+
+- name: Fetch built initramfs and kernel (+ hack for weird /@ prefix of BOOT_IMAGE)
+ fetch:
+ src: "{{ item }}"
+ dest: "{{ playbook_dir }}/boot_files/"
+ fail_on_missing: yes
+ flat: yes
+ with_items:
+ - "{{ gittarget }}/initramfs"
+ - "{{ ansible_cmdline.BOOT_IMAGE | regex_replace('^/@(/boot/.*)+$', '\\1') }}"
+
+- name: Cleanup
+ file:
+ path: "{{ gittarget }}"
+ state: absent