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

@ -9,43 +9,30 @@
- bigboot_vars.yml
tasks:
- name: Import rear_vars role
ansible.builtin.import_role:
name: rhc.rear.rear_vars
- name: Fetch the template name from NFS exports
ansible.builtin.set_fact:
job_template_name: "{{ nfs_exports_template_name }}"
- name: Check for backup success file for Bigboot
- name: Check for previous backup completion
ansible.builtin.stat:
path: "{{ bigboot_backup_success_file }}"
register: bigboot_backup_success
path: "{{ rear_backup_success_file_path }}/{{ rear_backup_workflow }}_rear_success"
register: rear_backup_success_file
- name: End if backup for Bigboot already exists
- name: End if backup has already completed successfully
ansible.builtin.meta: end_host
when:
- bigboot_backup_success['stat']['exists'] | bool
- rear_backup_success_file['stat']['exists'] | bool
- not rear_force_backup | default(false) | bool
- name: Perform ReaR Backup and write success log
- name: Perform ReaR Backup
when:
- bigboot_data[inventory_hostname]['bigboot_execute_bigboot'] | default(false) | bool
- not rear_backup_skip | default(false) | bool
block:
- name: Perform ReaR backup # noqa var-naming
- name: Perform ReaR backup
ansible.builtin.include_role:
name: rhc.rear.rear_backup
vars:
rear_nfs_backup_share: "{{ bigboot_nfs_backup_share }}"
- name: Check and archive ReaR backup log file
ansible.builtin.import_tasks: tasks/backup_rear_log.yml
- name: Create success file directory if not present
ansible.builtin.file:
path: "{{ bigboot_backup_success_path }}"
state: directory
mode: "0755"
- name: Create Bigboot backup success file
ansible.builtin.copy:
dest: "{{ bigboot_backup_success_file }}"
content: "success\n"
mode: "0644"