Add success file detection; put stuff in block
This commit is contained in:
parent
c5a3a86878
commit
9f069eb612
@ -11,14 +11,28 @@
|
||||
|
||||
|
||||
tasks:
|
||||
- name: Include the backup role
|
||||
ansible.builtin.include_role:
|
||||
name: ../roles/rear_backup
|
||||
- name: Check for backup success file
|
||||
ansible.builtin.stat:
|
||||
path: "{{ standalone_backup_success_file }}"
|
||||
register: standalone_backup_success
|
||||
|
||||
- name: End if backup for Bigboot already exists
|
||||
ansible.builtin.meta: end_host
|
||||
when:
|
||||
- standalone_backup_success['stat']['exists'] | bool
|
||||
- not rear_force_backup | default(false) | bool
|
||||
|
||||
|
||||
- name: Perform ReaR Backup and write success log
|
||||
when:
|
||||
- ansible_distribution_major_version >= '7'
|
||||
- not rear_backup_skip | default(false) | bool
|
||||
block:
|
||||
- name: Include the backup role
|
||||
ansible.builtin.include_role:
|
||||
name: ../roles/rear_backup
|
||||
|
||||
- name: Verify ReaR backup log is present
|
||||
- name: Confirm ReaR backup log is present
|
||||
ansible.builtin.stat:
|
||||
path: "/var/log/rear/rear-{{ ansible_hostname }}.log"
|
||||
register: rear_backup_log_stat
|
||||
|
Loading…
x
Reference in New Issue
Block a user