This repository has been archived on 2024-02-16. You can view files and clone it, but cannot push or open issues or pull requests.
sysconfig/roles/grub/tasks/main.yml

47 lines
1.2 KiB
YAML

---
- name: grub | Copy Miku wallpaper
copy:
src: miku.png
dest: /boot/grub/background.png
owner: root
group: root
mode: 0644
# Download a release from https://github.com/source-foundry/Hack
# Decompress the archive
# Run: grub-mkfont -o hack.pf2 -s 24 Hack-Regular.ttf
- name: grub | Copy Hack font
copy:
src: hack.pf2
dest: /boot/grub/fonts/hack.pf2
owner: root
group: root
mode: 0644
- name: grub | Adjust GRUB_TIMEOUT to 10s
lineinfile:
path: /etc/default/grub
regexp: '^GRUB_TIMEOUT='
line: 'GRUB_TIMEOUT=10'
owner: root
group: root
mode: 0644
validate: grep -F 'GRUB_TIMEOUT=10' %s
- name: grub | Add font and background configurations to /etc/default/grub
blockinfile:
path: /etc/default/grub
insertafter: '^GRUB_CMDLINE_LINUX_DEFAULT='
block: |
GRUB_DISABLE_OS_PROBER=true
GRUB_GFXMODE=1920x1080x32,1280x720x32,auto
GRUB_GFXPAYLOAD_LINUX=keep
GRUB_BACKGROUND=/boot/grub/background.png
GRUB_FONT=/boot/grub/fonts/hack.pf2
marker: '# {mark} CUSTOM SETTINGS BLOCK'
owner: root
group: root
mode: 0644
validate: grep -F 'hack.pf2' %s
notify: Update grub config