Fix freebsd user integration test repeatability (#86542)

* Cleanup previous user creations
This commit is contained in:
Patrick Kingston
2026-02-19 14:08:43 -05:00
committed by GitHub
parent d6f719429b
commit 7fdac45993
3 changed files with 21 additions and 1 deletions
@@ -0,0 +1,3 @@
---
bugfixes:
- user - ``user`` module integration tests can now run multiple times on the same freebsd host (https://github.com/ansible/ansible/issues/86541).
@@ -222,4 +222,13 @@
- user_test_local_mode
- name: Test expires for local users
import_tasks: test_local_expires.yml
block:
- import_tasks: test_local_expires.yml
always:
- name: Clean up local_ansibulluser
user:
name: local_ansibulluser
state: absent
force: yes
remove: yes
local: yes
@@ -61,6 +61,14 @@
- user_create_home_fallback_dir.stat.pw_name == 'ansibulluser'
- user_create_home_fallback_dir.stat.mode == user_login_defs_umask.stdout
always:
- name: Clean up ansibulluser
user:
name: ansibulluser
state: absent
force: true
remove: true
- name: Create non-system user
when: ansible_facts.distribution == "MacOSX"
block: