summaryrefslogtreecommitdiffstats
path: root/roles/bootstrap/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/bootstrap/tasks')
-rw-r--r--roles/bootstrap/tasks/install-archlinux.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/roles/bootstrap/tasks/install-archlinux.yml b/roles/bootstrap/tasks/install-archlinux.yml
index 1e4771a..5c746a8 100644
--- a/roles/bootstrap/tasks/install-archlinux.yml
+++ b/roles/bootstrap/tasks/install-archlinux.yml
@@ -36,6 +36,34 @@
- src: "archlinux.conf.j2"
dest: "{{ mnt_boot_path }}/loader/entries/archlinux.conf"
+- name: "Copy kernel to efi partition"
+ ansible.builtin.copy:
+ src: "{{ item }}"
+ dest: "{{ mnt_boot_path }}"
+ remote_src: true
+ mode: "0644"
+ with_items:
+ - "{{ mnt_root_path }}/boot/vmlinuz-linux"
+ - "{{ mnt_root_path }}/boot/initramfs-linux.img"
+ - "{{ mnt_root_path }}/boot/initramfs-linux-fallback.img"
+
+- name: "Configure pacman hook for updating kernel"
+ ansible.builtin.copy:
+ dest: "{{ mnt_root_path }}/etc/pacman.d/100-systemd-boot.hook"
+ mode: "0644"
+ content: |
+ [Trigger]
+ Type = Package
+ Operation = Upgrade
+ Target = linux
+
+ [Action]
+ Description = Updating systemd-boot
+ When = PostTransaction
+ Exec = /usr/bin/cp /boot/vmlinuz-linux /boot/efi/vmlinuz-linux
+ Exec = /usr/bin/cp /boot/initramfs-linux.img /boot/efi/initramfs-linux.img
+ Exec = /usr/bin/cp /boot/initramfs-linux-fallback.img /boot/efi/initramfs-linux-fallback.img
+
- name: "Configure hostname in chroot"
ansible.builtin.copy:
dest: "{{ mnt_root_path }}/etc/hostname"