use proper arg number

This commit is contained in:
David Boucha 2017-05-25 22:55:36 -06:00
parent 561a416cf3
commit 0324833c9e

View File

@ -432,7 +432,7 @@ def chgroups(name, groups, append=False, root=None):
if result['retcode'] != 0 and 'not found in' in result['stderr']:
ret = True
for group in groups:
cmd = ['gpasswd', '-a', '{0}'.format(name), '{1}'.format(group)]
cmd = ['gpasswd', '-a', '{0}'.format(name), '{0}'.format(group)]
if __salt__['cmd.retcode'](cmd, python_shell=False) != 0:
ret = False
return ret