ansible-desktop/roles/systemd-boot/tasks/arch.yml

70 lines
1.5 KiB
YAML
Raw Normal View History

2024-04-19 18:49:47 +00:00
---
- name: "[Arch] install efi drivers for ext4"
become: yes
community.general.pacman:
update_cache: yes
name:
- efifs
- name: "[Arch] Install systemd-boot"
become: yes
shell:
cmd: |
bootctl --esp-path {{ efs }} --boot-path {{ boot }} install
- name: "[Arch] Copy ext4 driver to systemd drivers"
become: yes
copy:
remote_src: true
2024-04-20 05:09:33 +00:00
src: /usr/lib/efifs-x64/ext2_x64.efi
2024-04-19 18:49:47 +00:00
dest: "{{ efs }}/EFI/systemd/drivers/ext2_x64.efi"
- name: "[Arch] Add main entry"
become: yes
template:
src: loader/entries/arch.conf.j2
dest: "{{ boot }}/loader/entries/arch.conf"
vars:
name: ""
variant: ""
version: "linux"
- name: "[Arch] Add fallback entry"
become: yes
template:
src: loader/entries/arch.conf.j2
dest: "{{ boot }}/loader/entries/arch-fallback.conf"
vars:
name: " Fallback"
variant: "-fallback"
version: "linux"
- name: "[Arch] Check if lts kernel is installed"
stat:
path: "{{ boot }}/vmlinuz-linux-lts"
register: lts_kernel
- name: "[Arch] Add lts entry"
become: yes
template:
src: loader/entries/arch.conf.j2
dest: "{{ boot }}/loader/entries/arch-lts.conf"
vars:
name: " LTS"
variant: ""
version: "linux-lts"
when:
- lts_kernel.stat.exists
- name: "[Arch] Add lts fallback entry"
become: yes
template:
src: loader/entries/arch.conf.j2
dest: "{{ boot }}/loader/entries/arch-lts-fallback.conf"
vars:
name: " LTS Fallback"
variant: "-fallback"
version: "linux-lts"
when:
- lts_kernel.stat.exists