From 3f4cacd355b1d053551d5d06825548e346466d25 Mon Sep 17 00:00:00 2001 From: s-hertel <19572925+s-hertel@users.noreply.github.com> Date: Mon, 2 May 2022 13:08:09 -0400 Subject: [PATCH] Remove MacOSX-specific cleanup for unarchive test --- .../unarchive/tasks/test_unprivileged_user.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/integration/targets/unarchive/tasks/test_unprivileged_user.yml b/test/integration/targets/unarchive/tasks/test_unprivileged_user.yml index 7022bba1e04..0fb2df4dbf8 100644 --- a/test/integration/targets/unarchive/tasks/test_unprivileged_user.yml +++ b/test/integration/targets/unarchive/tasks/test_unprivileged_user.yml @@ -79,9 +79,10 @@ become: yes become_user: root - - name: Remove user home directory on macOS - file: - path: /Users/unarchivetest1 - state: absent - become: no - when: ansible_facts.distribution == 'MacOSX' + - name: ensure home directory has been removed + stat: + path: "{{ user.home }}" + become: yes + become_user: root + register: home_dir + failed_when: home_dir.stat.exists