Reorganize the filesystem umount order.

* Clean /var/lib/kubelet before /var/lib/rancher/k3s.
* Umount the filesystem tree in reverse order, to ensure the root
  is umounted last.

Signed-off-by: Staf Wagemakers <staf@wagemakers.be>
This commit is contained in:
Staf Wagemakers 2021-01-24 10:16:20 +01:00
parent 999803ae14
commit fe7bdf8cda
2 changed files with 2 additions and 2 deletions

View File

@ -33,8 +33,8 @@
- "{{ systemd_dir }}/k3s.service"
- "{{ systemd_dir }}/k3s-node.service"
- /etc/rancher/k3s
- /var/lib/rancher/k3s
- /var/lib/kubelet
- /var/lib/rancher/k3s
- /usr/local/bin/k3s
- name: daemon_reload

View File

@ -12,4 +12,4 @@
path: "{{ item }}"
state: unmounted
with_items:
"{{ get_mounted_filesystems.stdout_lines }}"
"{{ get_mounted_filesystems.stdout_lines | reverse | list }}"