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('-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:
|
||||||
|
|
Loading…
Reference in a new issue