From 649a5bbda2b5074dc90988f6243dd981ab11fb59 Mon Sep 17 00:00:00 2001 From: Sloane Hertel <19572925+s-hertel@users.noreply.github.com> Date: Fri, 10 Sep 2021 12:44:42 -0400 Subject: [PATCH] Fix cleaning up user for unarchive tests (#75681) Become root to clean up user Clean up users with force and remove enabled Co-authored-by: Matt Martz --- test/integration/targets/unarchive/tasks/test_owner_group.yml | 2 ++ .../targets/unarchive/tasks/test_tar_gz_owner_group.yml | 2 ++ .../targets/unarchive/tasks/test_unprivileged_user.yml | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/integration/targets/unarchive/tasks/test_owner_group.yml b/test/integration/targets/unarchive/tasks/test_owner_group.yml index 95f1457e66a..227ad9ce5df 100644 --- a/test/integration/targets/unarchive/tasks/test_owner_group.yml +++ b/test/integration/targets/unarchive/tasks/test_owner_group.yml @@ -155,6 +155,8 @@ user: name: testuser state: absent + remove: yes + force: yes - name: Remove testgroup group: diff --git a/test/integration/targets/unarchive/tasks/test_tar_gz_owner_group.yml b/test/integration/targets/unarchive/tasks/test_tar_gz_owner_group.yml index 257692e1b13..e99f0380c7a 100644 --- a/test/integration/targets/unarchive/tasks/test_tar_gz_owner_group.yml +++ b/test/integration/targets/unarchive/tasks/test_tar_gz_owner_group.yml @@ -41,6 +41,8 @@ user: name: testuser state: absent + remove: yes + force: yes - name: Remove testgroup group: diff --git a/test/integration/targets/unarchive/tasks/test_unprivileged_user.yml b/test/integration/targets/unarchive/tasks/test_unprivileged_user.yml index e4c2bec5615..d35f88dc7c6 100644 --- a/test/integration/targets/unarchive/tasks/test_unprivileged_user.yml +++ b/test/integration/targets/unarchive/tasks/test_unprivileged_user.yml @@ -75,7 +75,8 @@ name: unarchivetest1 state: absent remove: yes - become: no + become: yes + become_user: root - name: Remove user home directory on macOS file: