]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
Allow unsigned deb packages install from mirror locations 429/head
authorGanesh Mahalingam <ganesh.mahalingam@intel.com>
Fri, 3 Feb 2017 19:06:25 +0000 (11:06 -0800)
committerGanesh Mahalingam <ganesh.mahalingam@intel.com>
Fri, 3 Feb 2017 19:15:25 +0000 (11:15 -0800)
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 <ganesh.mahalingam@intel.com>
ceph_deploy/hosts/debian/install.py

index ff1ffbd7d9a691bd964ab1b0b92c5be16a10c36c..4de7e1043b6c4990beee76e11273b970d6d22a50 100644 (file)
@@ -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):