---
- name: ReaR Backup Playbook
  hosts: all
  become: true
  gather_facts: true
  strategy: free

  tasks:
    - name: Fetch the template name from NFS exports
      ansible.builtin.set_fact:
        job_template_name: "{{ nfs_exports_template_name }}"

    - name: Perform ReaR backup # noqa var-naming
      ansible.builtin.include_role:
        name: rhc.rear.rear_backup
      vars:
        rear_nfs_export_share: /backups/bigboot
        rear_nfs_export_fsid: 10
      when:
        - bigboot_data[inventory_hostname]['bigboot_execute_bigboot'] | default(false) | bool
        - not rear_backup_skip | default(false) | bool
