mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #3001 from SirScott/user-always-changing
Fixes #2924: User creation always reports 'changed'
This commit is contained in:
commit
c397969ca3
1 changed files with 1 additions and 1 deletions
|
@ -395,7 +395,7 @@ class User(object):
|
|||
groups = []
|
||||
info = self.get_pwd_info()
|
||||
for group in grp.getgrall():
|
||||
if self.name in group[3] and info[3] != group[2]:
|
||||
if self.name in group.gr_mem and info[3] == group.gr_gid:
|
||||
groups.append(group[0])
|
||||
return groups
|
||||
|
||||
|
|
Loading…
Reference in a new issue