Run grub-mkconfig in a handler

This commit is contained in:
flyingscorpio@clevo 2022-02-27 12:03:17 +01:00
parent 3bfe29d700
commit 86afca262f
2 changed files with 5 additions and 4 deletions

View file

@ -0,0 +1,4 @@
---
- name: Generate grub config
become: true
command: grub-mkconfig -o /boot/grub/grub.cfg

View file

@ -11,6 +11,7 @@
- name: Set confs for grub
become: true
notify: Generate grub config
block:
- name: Set GRUB_DEFAULT to saved
replace:
@ -36,7 +37,3 @@
regexp: '^#?GRUB_DISABLE_SUBMENU.+'
replace: 'GRUB_DISABLE_SUBMENU=y'
backup: true
- name: Generate grub config
become: true
command: grub-mkconfig -o /boot/grub/grub.cfg