This commit is contained in:
2025-03-06 00:01:17 -05:00
parent 26638d9728
commit 25e7b03bef
9 changed files with 18 additions and 105 deletions

View File

@ -1,17 +1,5 @@
---
- name: Ensure share directory exists
ansible.builtin.file:
path: "{{ rear_vars_nfs_base }}/{{ rear_backup_workflow }}"
state: directory
mode: "0777"
owner: root
group: root
# We should use Ansible to determine disk space, not command/shell:
# - name: Debug mounts
# ansible.builtin.debug:
# var: ansible_facts['mounts']
# We should use Ansible to determine disk space, not command/shell (refactor):
- name: Check disk space on ReaR Backup filesystem for NFS servers
ansible.builtin.shell: |
set -o pipefail
@ -19,10 +7,6 @@
register: disk_space
changed_when: false
# - name: Debug disk_space
# ansible.builtin.debug:
# var: disk_space
- name: Fail job if less than 50GB space
ansible.builtin.fail:
msg: ReaR NFS server {{ inventory_hostname }} has less than 50GB of space on filesystem."
@ -34,6 +18,14 @@
when:
- client_ips is not defined
- name: Ensure share directory exists
ansible.builtin.file:
path: "{{ rear_vars_nfs_base }}/{{ rear_backup_workflow }}"
state: directory
mode: "0777"
owner: root
group: root
- name: Add remote hosts to /etc/exports
ansible.builtin.lineinfile:
path: /etc/exports

View File

@ -4,7 +4,7 @@
path: "{{ rear_backup_success_file_path }}/{{ rear_backup_workflow }}_rear_success"
register: rear_backup_success_file
- name: End if backup has already completed successfully
- name: End host if backup has already completed successfully
ansible.builtin.meta: end_host
when:
- rear_backup_success_file['stat']['exists'] | bool

View File

@ -6,10 +6,12 @@
# - rear_restore
rear_backup_workflow: standalone
# Used by:
# - rear_restore
rear_restore_tmpdir: /var/tmp/rear_restore
# Used by:
# - rear_backup
rear_backup_success_file_path: "/var/IPE/IPU/el7to8"
@ -17,6 +19,7 @@ rear_backup_success_file_path: "/var/IPE/IPU/el7to8"
rear_vars_grub_label: 'Relax-and-Recover *** RESTORES RHEL7 ***'
rear_vars_grub_conf: /etc/grub.d/45_rear
# Used by:
# - nfs_export
# - rear_backup