Remove whitespace from unix group names
This commit is contained in:
parent
c8e16793bf
commit
d0e3d75381
1 changed files with 1 additions and 1 deletions
|
@ -552,7 +552,7 @@ class User(object):
|
||||||
if self.groups is None:
|
if self.groups is None:
|
||||||
return None
|
return None
|
||||||
info = self.user_info()
|
info = self.user_info()
|
||||||
groups = set(filter(None, self.groups.split(',')))
|
groups = set([x.strip() for x in self.groups.split(',') if x])
|
||||||
for g in set(groups):
|
for g in set(groups):
|
||||||
if not self.group_exists(g):
|
if not self.group_exists(g):
|
||||||
self.module.fail_json(msg="Group %s does not exist" % (g))
|
self.module.fail_json(msg="Group %s does not exist" % (g))
|
||||||
|
|
Loading…
Reference in a new issue