Variable cleanup, configuration backup, log archive post-backup
This commit is contained in:
@ -81,3 +81,17 @@
|
||||
ansible.builtin.fail:
|
||||
msg: "ReaR backup has failed. Please review the logs for any errors, and try again."
|
||||
|
||||
- name: Verify ReaR configuration is present
|
||||
ansible.builtin.stat:
|
||||
path: /etc/rear
|
||||
register: rear_config_stat
|
||||
|
||||
- name: Create backup of ReaR configuration files
|
||||
community.general.archive:
|
||||
path: /etc/rear
|
||||
dest: /root/etc-rear-backup.tar.gz
|
||||
format: gz
|
||||
force_archive: true
|
||||
mode: "0600"
|
||||
when:
|
||||
- rear_config_stat['stat']['exists'] | bool
|
||||
|
Reference in New Issue
Block a user