Add restore functionality; update backup to include grub menu update
This commit is contained in:
4
roles/rear_backup/handlers/main.yml
Normal file
4
roles/rear_backup/handlers/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
- name: Update Grub
|
||||
ansible.builtin.command:
|
||||
cmd: grub2-mkconfig -o /boot/grub2/grub.cfg
|
@ -65,6 +65,13 @@
|
||||
changed_when: true
|
||||
register: rear_mkbackup
|
||||
|
||||
- name: Update ReaR Grub menu item
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ rear_grub_conf }}"
|
||||
line: "menuentry '{{ rear_grub_label }}' --class os {"
|
||||
state: present
|
||||
notify: Update Grub
|
||||
|
||||
- name: ReaR backup success
|
||||
ansible.builtin.debug:
|
||||
msg: "ReaR backup has completed successfully."
|
||||
|
Reference in New Issue
Block a user