def deluser(name, username):
 grp_info = __salt__['group.info'](name)
 if (username not in grp_info['members']):
  return True
 retcode = __salt__['cmd.retcode']('pw groupmod {0} -d {1}'.format(name, username), python_shell=False)
 return (not retcode)

def deluser ( name , username ) : grp_info = __salt__ [ 'group.info' ] ( name ) if ( username not in grp_info [ 'members' ] ) : return True retcode = __salt__ [ 'cmd.retcode' ] ( 'pw groupmod {0} -d {1}' . format ( name , username ) , python_shell = False ) return ( not retcode )
remove a user from the group .