Skip to content
Snippets Groups Projects
Commit 1cfaf927 authored by Alexander Block's avatar Alexander Block
Browse files

Fix reverse umount in reset role

The Jinja2 filter 'reverse' returned an iterator instead of a list,
resulting in the umount task to fail.

Intead of using the reverse filter, we use 'tac' to reverse the output
of the previous task.
parent 45135ad3
No related branches found
No related tags found
No related merge requests found
......@@ -24,12 +24,12 @@
shell: docker ps -aq | xargs -r docker rm -fv
- name: reset | gather mounted kubelet dirs
shell: mount | grep /var/lib/kubelet | awk '{print $3}'
shell: mount | grep /var/lib/kubelet | awk '{print $3}' | tac
register: mounted_dirs
- name: reset | unmount kubelet dirs
command: umount {{item}}
with_items: '{{ mounted_dirs.stdout_lines | reverse }}'
with_items: '{{ mounted_dirs.stdout_lines }}'
- name: reset | delete some files and directories
file: path={{ item }} state=absent
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment