Fix user.present state reporting for groups when remove_groups=false

This commit is contained in:
Jeffrey 'jf' Lim 2016-08-21 20:50:09 +08:00
parent 67692f868c
commit 1f818c832e

View file

@ -464,6 +464,8 @@ def present(name,
for key, val in iteritems(changes):
if key == 'password':
val = 'XXX-REDACTED-XXX'
elif key == 'group' and not remove_groups:
key = 'ensure groups'
ret['comment'] += u'{0}: {1}\n'.format(key, val)
return ret
# The user is present