mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-20 15:51:05 +00:00
Remove whitespace from unix group names
This commit is contained in:
committed by
Toshio Kuratomi
parent
c8e16793bf
commit
d0e3d75381
@@ -552,7 +552,7 @@ class User(object):
|
||||
if self.groups is None:
|
||||
return None
|
||||
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):
|
||||
if not self.group_exists(g):
|
||||
self.module.fail_json(msg="Group %s does not exist" % (g))
|
||||
|
||||
Reference in New Issue
Block a user