You've already forked ansible-role-common
Add additional handler to check existence
This commit is contained in:
@@ -23,5 +23,11 @@
|
|||||||
name: NetworkManager
|
name: NetworkManager
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: Check if grub.cfg exists
|
||||||
|
stat:
|
||||||
|
path: /boot/grub2/grub.cfg
|
||||||
|
register: grub_cfg
|
||||||
|
|
||||||
- name: Update GRUB
|
- name: Update GRUB
|
||||||
command: /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
|
command: /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||||
|
when: grub_cfg.stat.exists
|
||||||
|
|||||||
Reference in New Issue
Block a user