The passed gid can be the group name, covert it to gid before comparing.

This commit is contained in:
Pedro Algarvio 2013-03-12 07:34:21 +00:00
parent e052116d32
commit 1c4164f031

View File

@ -66,7 +66,8 @@ def _changes(
if lusr['uid'] != uid:
change['uid'] = uid
if gid:
if lusr['gid'] != gid:
if lusr['gid'] not in (gid,
__salt__['file.group_to_gid'](gid)):
change['gid'] = gid
# remove the default group from the list for
# comparison purposes