--- - name: ReaR Backup Playbook hosts: all become: true gather_facts: true strategy: free vars: bigboot_backup_success_file: /var/log/IPE/IPU/bigboot_rear_success bigboot_nfs_backup_share: /backups/bigboot bigboot_nfs_backup_share_fsid: 20 tasks: - name: Fetch the template name from NFS exports ansible.builtin.set_fact: job_template_name: "{{ nfs_exports_template_name }}" - name: Check for previous backup for Bigboot ansible.builtin.stat: path: "{{ bigboot_backup_success_file }}" register: bigboot_backup_success - name: Perform ReaR Backup and write success log when: - bigboot_data[inventory_hostname]['bigboot_execute_bigboot'] | default(false) | bool - not rear_backup_skip | default(false) | bool - not rear_backup_success['stat']['exists'] | bool block: - name: Perform ReaR backup # noqa var-naming ansible.builtin.include_role: name: rhc.rear.rear_backup no_log: false vars: rear_nfs_export_share: "{{ bigboot_nfs_backup_share }}" rear_nfs_export_fsid: "{{ bigboot_nfs_backup_share_fsid }}" - name: Create success file directory if not present ansible.builtin.file: path: "{{ rear_backup_success_path }}" state: directory mode: "0755" - name: Create Bigboot backup success file ansible.builtin.copy: dest: "{{ rear_backup_success_file }}" content: "success\n" mode: "0644"