Updates to Bigboot ReaR based on updates to ReaR

This commit is contained in:
2025-03-04 15:25:00 -05:00
parent 3c05c4cd5d
commit 212a686c90
4 changed files with 16 additions and 54 deletions

View File

@ -1,22 +0,0 @@
---
- name: Check for ReaR backup log file presence
ansible.builtin.stat:
path: "/var/log/rear/rear-{{ ansible_hostname }}.log"
register: bigboot_rear_log
- name: Backup ReaR log file
when:
- bigboot_rear_log['stat']['exists']
block:
- name: Copy ReaR log file to backup location
ansible.builtin.copy:
src: "/var/log/rear/rear-{{ ansible_hostname }}.log"
dest: "/var/log/rear-{{ ansible_hostname }}-{{ '%Y-%m-%d' | strftime(bigboot_rear_log['stat']['mtime']) }}.log"
mode: "0644"
backup: true
remote_src: true
- name: Remove ReaR log file
ansible.builtin.file:
path: "/var/log/rear/rear-{{ ansible_hostname }}.log"
state: absent