harden reset to work in more cases (#6781)

reset playbook fails and does not continue cleanup after for
example a host reboot with kubelet stopped/disabled
This commit is contained in:
Hans Feldt 2020-10-05 21:55:21 +02:00 committed by GitHub
parent 9729b6b75a
commit b0097fd0c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,6 +147,7 @@
warn: false warn: false
check_mode: no check_mode: no
register: mounted_dirs register: mounted_dirs
failed_when: false
tags: tags:
- mounts - mounts
@ -154,6 +155,7 @@
command: umount -f {{ item }} command: umount -f {{ item }}
with_items: "{{ mounted_dirs.stdout_lines }}" with_items: "{{ mounted_dirs.stdout_lines }}"
register: umount_dir register: umount_dir
when: mounted_dirs
retries: 4 retries: 4
until: umount_dir.rc == 0 until: umount_dir.rc == 0
delay: 5 delay: 5