Rename umount_with_childeren.yml to umount_with_children.yml

This commit is contained in:
jeffspahr
2020-08-16 21:25:28 -04:00
committed by GitHub
parent 09a68c398f
commit 76e1c7838a

View File

@@ -0,0 +1,15 @@
---
- name: Get the list of mounted filesystems
shell: set -o pipefail && cat /proc/mounts | awk '{ print $2}' | grep -E "^{{ mounted_fs }}"
register: get_mounted_filesystems
args:
executable: /bin/bash
failed_when: false
changed_when: get_mounted_filesystems.stdout | length > 0
- name: Umount filesystem
mount:
path: "{{ item }}"
state: unmounted
with_items:
"{{ get_mounted_filesystems.stdout_lines }}"