From 406db382962a183cbb4dff26ad78d4a5c9ed5f53 Mon Sep 17 00:00:00 2001 From: Sandwich Date: Thu, 31 Oct 2024 15:35:22 +0100 Subject: [PATCH] dont use sudo for umount --- roles/cleanup/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/cleanup/tasks/main.yml b/roles/cleanup/tasks/main.yml index a796f95..0bf13cd 100644 --- a/roles/cleanup/tasks/main.yml +++ b/roles/cleanup/tasks/main.yml @@ -1,7 +1,8 @@ --- - name: Unmount /mnt recursively when: os not in ['rhel8', 'rhel9'] - ansible.builtin.command: umount -R /mnt + become: false + ansible.builtin.command: umount -l /mnt changed_when: result.rc == 0 register: result