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