Closed schamola closed 4 months ago
Please have a proper description, output and reasoning in a PR. It's a pain for us. Thanks !
Unmounting filesystems was sometimes not working as expected.
Basically, when the options are not provided while mounting, "mount" command's output does not contain anything in the options column, thus this part of code fdirs.append(ln.split()[-6])
doesn't append the right filesystem to fdirs list.
This issue is solved if we iterate the output received from "mount" command from the beginning and take the second filesystem (having a "/" inside it, as all FS would contain a "/") which would basically be mount_over_dir value and will be later used to confirm if the fs is mounted or not. Attaching the task and output below for your reference.
Thanks!
PS: Let me know if any other clarification is required.
Playbook task:
- name: Umount NFS '{{ NFSMOUNT }}'
ibm.power_aix.mount:
state: umount
mount_over_dir: /check_mnt
Output:
Fixes issue #417