--- - 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 src: /usr/lib/efifs-x64/ext2_x64.efi 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