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 <matt@sivel.net>
This commit is contained in:
Sloane Hertel
2021-09-10 12:44:42 -04:00
committed by GitHub
co-authored by Matt Martz
parent 05464a0ff7
commit 649a5bbda2
3 changed files with 6 additions and 1 deletions
@@ -155,6 +155,8 @@
user:
name: testuser
state: absent
remove: yes
force: yes
- name: Remove testgroup
group:
@@ -41,6 +41,8 @@
user:
name: testuser
state: absent
remove: yes
force: yes
- name: Remove testgroup
group:
@@ -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: