Exemplo n.º 1
0
def mirror_install(distro, repo_url, gpg_url, adjust_repos, **kw):
    packages = map_components(kw.get('components', []))
    repo_url = repo_url.strip('/')  # Remove trailing slashes
    gpg_url_path = gpg_url.split('file://')[-1]  # Remove file if present

    if adjust_repos:
        remoto.process.run(
            distro.conn,
            [
                'rpm',
                '--import',
                gpg_url_path,
            ]
        )

        ceph_repo_content = templates.zypper_repo.format(
            repo_url=repo_url,
            gpg_url=gpg_url
        )
        distro.conn.remote_module.write_file(
            '/etc/zypp/repos.d/ceph.repo',
            ceph_repo_content)
        pkg_managers.zypper_refresh(distro.conn)

    if len(packages):
        pkg_managers.zypper(distro.conn, packages)
Exemplo n.º 2
0
def install(distro, version_kind, version, adjust_repos, **kw):
    packages = map_components(kw.get('components', []))

    pkg_managers.zypper_refresh(distro.conn)
    if len(packages):
        pkg_managers.zypper(distro.conn, packages)