mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-09-24 10:33:23 -07:00
Merge pull request #3732 from rishid/devel
User: when creating new user, ignore empty groups value
This commit is contained in:
commit
d485abe2e7
1 changed files with 2 additions and 2 deletions
|
@ -279,7 +279,7 @@ class User(object):
|
||||||
cmd.append('-g')
|
cmd.append('-g')
|
||||||
cmd.append(self.group)
|
cmd.append(self.group)
|
||||||
|
|
||||||
if self.groups is not None:
|
if self.groups is not None and len(self.groups):
|
||||||
groups = self.get_groups_set()
|
groups = self.get_groups_set()
|
||||||
cmd.append('-G')
|
cmd.append('-G')
|
||||||
cmd.append(','.join(groups))
|
cmd.append(','.join(groups))
|
||||||
|
@ -1221,7 +1221,7 @@ class AIX(User):
|
||||||
cmd.append('-g')
|
cmd.append('-g')
|
||||||
cmd.append(self.group)
|
cmd.append(self.group)
|
||||||
|
|
||||||
if self.groups is not None:
|
if self.groups is not None and len(self.groups):
|
||||||
groups = self.get_groups_set()
|
groups = self.get_groups_set()
|
||||||
cmd.append('-G')
|
cmd.append('-G')
|
||||||
cmd.append(','.join(groups))
|
cmd.append(','.join(groups))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue