Remove uefi entry configuration & add systemd-boot pacman hook
This commit is contained in:
parent
a51ba82d32
commit
09fbaf597c
8 changed files with 47 additions and 78 deletions
|
|
@ -28,47 +28,56 @@
|
|||
- name: Copy pacman configuration
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: 'templates/pacman.j2'
|
||||
dest: '/etc/pacman.conf'
|
||||
src: "templates/pacman/config.j2"
|
||||
dest: "/etc/pacman.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
mode: "0644"
|
||||
|
||||
- name: Create extra conf
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: '/etc/pacman.d/extra.conf'
|
||||
path: "/etc/pacman.d/extra.conf"
|
||||
owner: root
|
||||
group: root
|
||||
state: touch
|
||||
mode: '0644'
|
||||
mode: "0644"
|
||||
|
||||
- name: Copy systemd-boot pacman hook
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: "templates/pacman/hook.j2"
|
||||
dest: "/etc/pacman.d/hooks/100-systemd-boot.hook"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
|
||||
- name: Setup Wezterm
|
||||
when: "'wezterm' in packages"
|
||||
block:
|
||||
- name: Create wezterm configuration dir
|
||||
ansible.builtin.file:
|
||||
path: '{{ xdg_config_dir }}/wezterm/includes'
|
||||
path: "{{ xdg_config_dir }}/wezterm/includes"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
mode: "0755"
|
||||
|
||||
- name: Copy wezterm configuration files
|
||||
ansible.builtin.template:
|
||||
src: '{{ item.src }}'
|
||||
dest: '{{ item.dest }}'
|
||||
mode: '0755'
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: "0755"
|
||||
loop:
|
||||
- src: 'templates/wezterm/wezterm.lua.j2'
|
||||
dest: '{{ xdg_config_dir }}/wezterm/wezterm.lua'
|
||||
- src: "templates/wezterm/wezterm.lua.j2"
|
||||
dest: "{{ xdg_config_dir }}/wezterm/wezterm.lua"
|
||||
|
||||
- src: 'templates/wezterm/includes/colors.lua.j2'
|
||||
dest: '{{ xdg_config_dir }}/wezterm/includes/colors.lua'
|
||||
- src: "templates/wezterm/includes/colors.lua.j2"
|
||||
dest: "{{ xdg_config_dir }}/wezterm/includes/colors.lua"
|
||||
|
||||
- src: 'templates/wezterm/includes/fonts.lua.j2'
|
||||
dest: '{{ xdg_config_dir }}/wezterm/includes/fonts.lua'
|
||||
- src: "templates/wezterm/includes/fonts.lua.j2"
|
||||
dest: "{{ xdg_config_dir }}/wezterm/includes/fonts.lua"
|
||||
|
||||
- src: 'templates/wezterm/includes/window.lua.j2'
|
||||
dest: '{{ xdg_config_dir }}/wezterm/includes/window.lua'
|
||||
- src: "templates/wezterm/includes/window.lua.j2"
|
||||
dest: "{{ xdg_config_dir }}/wezterm/includes/window.lua"
|
||||
|
||||
- name: Enable fstrim timer
|
||||
become: true
|
||||
|
|
@ -153,53 +162,17 @@
|
|||
- name: Copy mkinitcpio configuration files
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: '{{ item.src }}'
|
||||
dest: '{{ item.dest }}'
|
||||
mode: '0755'
|
||||
loop: '{{ mkinitcpio_templates }}'
|
||||
when: '{{ mkinitcpio_templates | length > 0 }}'
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: "0755"
|
||||
loop: "{{ mkinitcpio_templates }}"
|
||||
when: "{{ mkinitcpio_templates | length > 0 }}"
|
||||
|
||||
- name: Regenerate initramfs images
|
||||
become: true
|
||||
ansible.builtin.command: 'mkinitcpio --allpresets'
|
||||
ansible.builtin.command: "mkinitcpio --allpresets"
|
||||
register: mkinitcpio_stats
|
||||
|
||||
- name: Log mkinitcpio stdout
|
||||
ansible.builtin.debug:
|
||||
var: mkinitcpio_stats.stdout_lines
|
||||
|
||||
- name: Create a Linux UEFI boot entry
|
||||
become: true
|
||||
ansible.builtin.command: efibootmgr \
|
||||
--create \
|
||||
--disk '{{ boot_configuration.disk }}' \
|
||||
--part '{{ boot_configuration.partition }}' \
|
||||
--label 'Arch Linux' \
|
||||
--loader '\EFI\Linux\linux.efi'\
|
||||
--unicode
|
||||
--index 0
|
||||
register: efi_linux_stats
|
||||
when: register_uefi_entries
|
||||
|
||||
- name: Log efibootmgr stdout
|
||||
ansible.builtin.debug:
|
||||
var: efi_linux_stats.stdout_lines
|
||||
when: register_uefi_entries
|
||||
|
||||
- name: Create a Linux LTS UEFI boot entry
|
||||
become: true
|
||||
ansible.builtin.command: efibootmgr \
|
||||
--create \
|
||||
--disk '{{ boot_configuration.disk }}' \
|
||||
--part '{{ boot_configuration.partition }}' \
|
||||
--label 'Arch Linux LTS' \
|
||||
--loader '\EFI\Linux\linux-lts.efi'\
|
||||
--unicode
|
||||
--index 1
|
||||
register: efi_linux_lts_stats
|
||||
when: register_uefi_entries
|
||||
|
||||
- name: Log efibootmgr LTS stdout
|
||||
ansible.builtin.debug:
|
||||
var: efi_linux_lts_stats.stdout_lines
|
||||
when: register_uefi_entries
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue