26 lines
824 B
YAML

---
- name: Try to unmount the filesystem
block:
- name: Unmount filesystem
ansible.posix.mount:
path: "{{ rear_unmount_nfs_path }}"
state: unmounted
delay: 3
retries: 3
rescue:
- name: "Rescue: Lazy unmount the NFS share"
ansible.builtin.command:
cmd: "umount -l {{ rear_unmount_nfs_path }}"
- name: Log unmount rescue to syslogger
community.general.syslogger:
msg: "{{ lookup('template', 'syslog.j2') | replace('\n', ' ') }}"
ident: ansbl_rear_unmount_rescue
vars:
actor: "rear_unmount_rescue"
title: >
ReaR Unmount Rescue
summary: "Unable to unmount the filesystem {{ rear_unmount_nfs_path }} using POSIX module. Rescued via lazy unmount."
severity: "high"
flags: ["inhibitor"]