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('-A')
cmd.append(','.join(group_diff))
else:
cmd.append('-G') cmd.append('-G')
cmd.append(','.join(groups)) new_groups = groups
if self.append:
new_groups = groups | set(current_groups)
cmd.append(','.join(new_groups))
if self.comment is not None and info[4] != self.comment: if self.comment is not None and info[4] != self.comment: