You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
442 B
YAML
11 lines
442 B
YAML
2 years ago
|
- name: "Get grub timeout value"
|
||
|
shell: cat /etc/default/grub | grep GRUB_TIMEOUT | sed 's/GRUB_TIMEOUT=//g'
|
||
|
register: current_grub_timeout
|
||
|
|
||
|
- name: 'Configure grub timeout if not already'
|
||
|
shell: sed 's/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT={{ timeout }}/g' -i /etc/default/grub
|
||
|
when: current_grub_timeout.stdout != "{{ grub_timeout }}"
|
||
|
|
||
|
- name: 'Update grub'
|
||
|
shell: update-grub
|
||
|
when: current_grub_timeout.stdout != "{{ grub_timeout }}"
|