diff options
author | Jonathan Bauer | 2018-08-21 13:52:53 +0200 |
---|---|---|
committer | Jonathan Bauer | 2018-08-21 13:52:53 +0200 |
commit | 0be73fee39dad71d2efb34abaddfa6f66c772dbd (patch) | |
tree | 0db35446f63d3e3c9fa87a6e6fcc78d53992b5ba /slx-builder/tasks/main.yml | |
parent | [dracut-initramfs-builder] add kmod headers to fulfill dracut v47 (diff) | |
download | ansible-dracut-0be73fee39dad71d2efb34abaddfa6f66c772dbd.tar.gz ansible-dracut-0be73fee39dad71d2efb34abaddfa6f66c772dbd.tar.xz ansible-dracut-0be73fee39dad71d2efb34abaddfa6f66c772dbd.zip |
renamed 'dracut-initramfs-builder' to 'slx-builder'
same with the playbook including this role
Diffstat (limited to 'slx-builder/tasks/main.yml')
-rw-r--r-- | slx-builder/tasks/main.yml | 34 |
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 |