ansible_public/playbooks/config/config_grub.yaml

55 lines
1.5 KiB
YAML
Raw Normal View History

2022-06-14 18:53:16 +02:00
- hosts: '{{ variable_host | default("lab15_standard") }}'
gather_facts: no
become: yes
tasks:
- name: Set GRUB_TIMEOUT_STYLE=menu
ini_file:
path: /etc/default/grub
section: null
option: GRUB_TIMEOUT_STYLE
value: menu
no_extra_spaces: yes
- name: Set GRUB_TIMEOUT=5
ini_file:
path: /etc/default/grub
section: null
option: GRUB_TIMEOUT
value: 5
no_extra_spaces: yes
- name: Set GRUB_SAVEDEFAULT=true
ini_file:
path: /etc/default/grub
section: null
option: GRUB_SAVEDEFAULT
value: 'true'
no_extra_spaces: yes
- name: Set GRUB_DEFAULT-saved
ini_file:
path: /etc/default/grub
section: null
option: GRUB_DEFAULT
value: saved
no_extra_spaces: yes
- name: Set GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0 nvidia-drm.modeset=1"
ini_file:
path: /etc/default/grub
section: null
option: GRUB_CMDLINE_LINUX_DEFAULT
value: '"quiet splash nouveau.modeset=0 nvidia-drm.modeset=1"'
no_extra_spaces: yes
- name: update-grub
shell: update-grub2
register: grub_update
ignore_errors: true
- name: replace shimx64.efi with grubx64.efi
copy:
src: /boot/efi/EFI/ubuntu/grubx64.efi
dest: /boot/efi/EFI/ubuntu/shimx64.efi
remote_src: yes