Hi,
I have my facts as like below to unmount a file system in my EC2 via ansible. the ansible playbook executes fine without any issues but still file system doesnt get unmounted (eventhough not in use or no errors). The actual commands to manually unmount a volume works fine though.
Any pointers would be of great help.
-
set_fact:
device: /dev/xvdb
when: nvmedev.stat.exists == False -
name: Unmount device
mount:
name: “{{ item }}”
src: none
fstype: none
state: unmounted
with_items: -
/dev/xvdb1
-
name: Unmount
mount:
path: /dev/nvme1n1
state: absent
Regards
Karthick