Fixes #2924: User creation always reports 'changed'

This commit is contained in:
Scott Sturdivant 2013-05-23 13:43:23 -06:00
parent 8f3b2b281f
commit 922a1efbc0

View file

@ -395,7 +395,7 @@ class User(object):
groups = [] groups = []
info = self.get_pwd_info() info = self.get_pwd_info()
for group in grp.getgrall(): 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]) groups.append(group[0])
return groups return groups