List all of the local package repositories.

    :param str config_path: The path to the configuration file for the aptly instance.
    :param bool with_packages: Return a list of packages in the repo.

    :return: A dictionary of the repositories.
    :rtype: dict

    CLI Example:

    .. code-block:: bash

        salt '*' aptly.list_repos

def list_repos(config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
    '''
    List all of the local package repositories.

    :param str config_path: The path to the configuration file for the aptly instance.
    :param bool with_packages: Return a list of packages in the repo.

    :return: A dictionary of the repositories.
    :rtype: dict

    CLI Example:

    .. code-block:: bash

        salt '*' aptly.list_repos
    '''
    _validate_config(config_path)

    ret = dict()
    cmd = ['repo', 'list', '-config={}'.format(config_path), '-raw=true']

    cmd_ret = _cmd_run(cmd)
    repos = [line.strip() for line in cmd_ret.splitlines()]

    log.debug('Found repositories: %s', len(repos))

    for name in repos:
        ret[name] = get_repo(name=name, config_path=config_path,
                             with_packages=with_packages)
    return ret