mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-26 00:22:36 +01:00
Rename umount_with_childeren.yml to umount_with_children.yml
This commit is contained in:
15
roles/reset/tasks/umount_with_children.yml
Normal file
15
roles/reset/tasks/umount_with_children.yml
Normal 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 }}"
|
||||
Reference in New Issue
Block a user