mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
c50cf22d52
commit
b04df23da2
1 changed files with 5 additions and 8 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue