Add vars role so we can share datas

This commit is contained in:
Chris Hammer 2025-03-03 20:03:04 -05:00
parent 70dc11455a
commit 1b976ca5df
5 changed files with 51 additions and 15 deletions

19
playbooks/rear_vars.yml Normal file
View File

@ -0,0 +1,19 @@
---
- name: Expose ReaR variables
hosts: all
become: true
gather_facts: true
strategy: free
tasks:
- name: Include rear_vars
ansible.builtin.import_role:
name: ../roles/rear_vars
- name: Debug rear_vars_nfs_share
ansible.builtin.debug:
msg: "{{ rear_vars_nfs_share['standalone']['share'] }} -> {{ rear_vars_nfs_share['standalone']['fsid'] }}"
- name: Debug rear_vars_grub_label
ansible.builtin.debug:
var: rear_vars_grub_label

View File

@ -1,3 +0,0 @@
---
rear_nfs_export_share: "/backups/standalone"
rear_nfs_export_fsid: 10

View File

@ -1,7 +0,0 @@
---
nfs_np:
- 10.10.42.180
- 10.10.42.228
nfs_prod:
- 10.10.42.180

View File

@ -1,5 +0,0 @@
---
rear_nfs_backup_share: /backups/standalone
rear_grub_label: 'Relax-and-Recover *** RESTORES RHEL7 ***'
rear_grub_conf: /etc/grub.d/45_rear

View File

@ -0,0 +1,32 @@
---
# Used by:
# - nfs_exports
# - nfs_server_define
# - rear_backup
# - rear_local-cfg
rear_vars_nfs_share:
standalone:
share: /backups/standalone
fsid: 10
bigboot:
share: /backups/bigboot
fsid: 20
rh-os-upgrade:
share: /backups/rhel-os-upgrade
fsid: 30
# Used by:
# - rear_local-cfg
rear_vars_nfs_np:
- 10.10.42.180
- 10.10.42.228
rear_varsnfs_prod:
- 10.10.42.180
# Used by:
# - rear_backup
rear_vars_grub_label: 'Relax-and-Recover *** RESTORES RHEL7 ***'
rear_vars_grub_conf: /etc/grub.d/45_rear