1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
This commit is contained in:
taksekine 2017-05-12 05:59:39 +09:00 committed by Matt Davis
parent c50cf22d52
commit b04df23da2

View file

@ -2068,20 +2068,17 @@ class HPUX(User):
if self.append: if self.append:
for g in groups: for g in groups:
if g in group_diff: if g in group_diff:
if has_append:
cmd.append('-a')
groups_need_mod = True groups_need_mod = True
break break
else: else:
groups_need_mod = True groups_need_mod = True
if groups_need_mod: if groups_need_mod:
if self.append and not has_append: cmd.append('-G')
cmd.append('-A') new_groups = groups
cmd.append(','.join(group_diff)) if self.append:
else: new_groups = groups | set(current_groups)
cmd.append('-G') cmd.append(','.join(new_groups))
cmd.append(','.join(groups))
if self.comment is not None and info[4] != self.comment: if self.comment is not None and info[4] != self.comment: