From: Ganesh Mahalingam Date: Fri, 3 Feb 2017 19:06:25 +0000 (-0800) Subject: Allow unsigned deb packages install from mirror locations X-Git-Tag: v1.5.38~10^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F429%2Fhead;p=ceph-deploy.git Allow unsigned deb packages install from mirror locations In a test deployment, hosting ceph packages in a local mirror and installing them across the cluster will be ideal. Current ceph-deploy allows unauthenticated packages when install is used but not from a mirror location. This change helps address that usecase. Signed-off-by: Ganesh Mahalingam --- diff --git a/ceph_deploy/hosts/debian/install.py b/ceph_deploy/hosts/debian/install.py index ff1ffbd..4de7e10 100644 --- a/ceph_deploy/hosts/debian/install.py +++ b/ceph_deploy/hosts/debian/install.py @@ -76,6 +76,7 @@ def install(distro, version_kind, version, adjust_repos, **kw): def mirror_install(distro, repo_url, gpg_url, adjust_repos, **kw): packages = kw.pop('components', []) + version_kind = kw['args'].version_kind repo_url = repo_url.strip('/') # Remove trailing slashes if adjust_repos: @@ -87,9 +88,13 @@ def mirror_install(distro, repo_url, gpg_url, adjust_repos, **kw): distro.conn.remote_module.write_sources_list(repo_url, distro.codename) + extra_install_flags = ['--allow-unauthenticated'] if version_kind in 'dev' else [] + if packages: distro.packager.clean() - distro.packager.install(packages) + distro.packager.install( + packages, + extra_install_flags=extra_install_flags) def repo_install(distro, repo_name, baseurl, gpgkey, **kw):