mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
minor linux user module fixups
This commit is contained in:
parent
8f9bef9d51
commit
ae36fb1dc6
1 changed files with 2 additions and 2 deletions
|
@ -296,7 +296,7 @@ class User(object):
|
||||||
|
|
||||||
if self.group is not None:
|
if self.group is not None:
|
||||||
if not self.group_exists(self.group):
|
if not self.group_exists(self.group):
|
||||||
module.fail_json(msg="Group %s does not exist" % self.group)
|
self.module.fail_json(msg="Group %s does not exist" % self.group)
|
||||||
ginfo = self.group_info(self.group)
|
ginfo = self.group_info(self.group)
|
||||||
if info[3] != ginfo[2]:
|
if info[3] != ginfo[2]:
|
||||||
cmd.append('-g')
|
cmd.append('-g')
|
||||||
|
@ -307,7 +307,7 @@ class User(object):
|
||||||
groups = self.groups.split(',')
|
groups = self.groups.split(',')
|
||||||
for g in groups:
|
for g in groups:
|
||||||
if not self.group_exists(g):
|
if not self.group_exists(g):
|
||||||
module.fail_json(msg="Group %s does not exist" % (g))
|
self.module.fail_json(msg="Group %s does not exist" % (g))
|
||||||
|
|
||||||
group_diff = set(sorted(current_groups)).symmetric_difference(set(sorted(groups)))
|
group_diff = set(sorted(current_groups)).symmetric_difference(set(sorted(groups)))
|
||||||
groups_need_mod = False
|
groups_need_mod = False
|
||||||
|
|
Loading…
Reference in a new issue