Add a GRUB_RECORDFAIL_TIMEOUT option.

This commit is contained in:
Robert de Bock 2020-08-23 15:22:37 +02:00
parent 8e7c770cf3
commit 4a4d9dff10
4 changed files with 19 additions and 0 deletions

View file

@ -74,6 +74,8 @@ These variables are set in `defaults/main.yml`:
grub_timeout: 5
grub_recordfail_timeout: "{{ grub_timeout }}"
# Add options here, for example:
# grub_options:
# - option: cgroup_enable

View file

@ -3,6 +3,8 @@
grub_timeout: 5
grub_recordfail_timeout: "{{ grub_timeout }}"
# Add options here, for example:
# grub_options:
# - option: cgroup_enable

View file

@ -6,6 +6,13 @@
- grub_timeout | int >= 0
quiet: yes
- name: test if grub_recordfail_timeout is set correctly
assert:
that:
- grub_recordfail_timeout is defined
- grub_recordfail_timeout | int >= 0
quiet: yes
- name: test if grub_options is set correctly
assert:
that:

View file

@ -16,6 +16,14 @@
notify:
- update grub
- name: set GRUB_RECORDFAIL_TIMEOUT
lineinfile:
path: /etc/default/grub
line: GRUB_RECORDFAIL_TIMEOUT={{ grub_recordfail_timeout }}
create: yes
notify:
- update grub
- name: add options to GRUB_CMDLINE_LINUX
replace:
path: /etc/default/grub