Creating user directory using tilde always reports "changed" #82490
Labels
affects_2.15
affects_2.16
bug
This issue/PR relates to a bug.
easyfix
This issue is considered easy to fix by aspiring contributors.
has_pr
This issue has an associated PR.
module
This issue/PR relates to a module.
Summary
The creation of a user always reports "changed" if you use tilde expansion for the path to the shell.
It seems that there is a missing tilde-expansion step when checking whether the desired shell equals the one already in use. I believe the offending line is here:
ansible/lib/ansible/modules/user.py
Line 920 in 6e4a5ac
On this line,
self.shell
is the desired shell andinfo[6]
is the current shell.The closest previous issue I can find is #38529.
Issue Type
Bug Report
Component Name
user
Ansible Version
Configuration
OS / Environment
Debian 12, controlled from MacOS 14.2.1
Steps to Reproduce
Expected Results
TASK [create user "bob"] ****************************************
ok: [snowy]
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: