Variable cleanup, configuration backup, log archive post-backup

This commit is contained in:
2025-02-28 15:29:34 -05:00
parent cd16954ae5
commit e11710f504
5 changed files with 40 additions and 4 deletions

View File

@ -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