'Return the next available uid'

def _get_next_uid(self):

    cmd = self._get_dscl()
    cmd += ['-list', '/Users', 'UniqueID']
    (rc, out, err) = self.execute_command(cmd, obey_checkmode=False)
    if (rc != 0):
        self.module.fail_json(msg='Unable    to    get    the    next    available    uid', rc=rc, out=out, err=err)
    max_uid = 0
    for line in out.splitlines():
        if (max_uid < int(line.split()[1])):
            max_uid = int(line.split()[1])
    return (max_uid + 1)
