From c96f3a93eddca97a1edafc35e15f06ca993d9764 Mon Sep 17 00:00:00 2001 From: Ganesh Mahalingam Date: Fri, 3 Feb 2017 11:06:25 -0800 Subject: [PATCH] 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 --- ceph_deploy/hosts/debian/install.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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): -- 2.47.3