mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Only report change when home directory is different on FreeBSD (#42865)
* Only report change when home directory is different Add tests with home: parameter Have to skip macOS for now since there is a bug when specifying the home directory path for an existing user that results in a module failure. That needs to be fixed in a separate PR.
This commit is contained in:
parent
786613f426
commit
0ca61e9d87
4 changed files with 60 additions and 5 deletions
|
@ -1010,8 +1010,9 @@ class FreeBsdUser(User):
|
|||
if self.home is not None:
|
||||
if (info[5] != self.home and self.move_home) or (not os.path.exists(self.home) and self.create_home):
|
||||
cmd.append('-m')
|
||||
cmd.append('-d')
|
||||
cmd.append(self.home)
|
||||
if info[5] != self.home:
|
||||
cmd.append('-d')
|
||||
cmd.append(self.home)
|
||||
|
||||
if self.skeleton is not None:
|
||||
cmd.append('-k')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue