]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
Use proper rpm %dist postfix for rhel7 rpms
authorDavid Vossel <dvossel@redhat.com>
Mon, 30 Jun 2014 20:40:21 +0000 (16:40 -0400)
committerDavid Vossel <dvossel@redhat.com>
Fri, 4 Jul 2014 01:09:07 +0000 (20:09 -0500)
ceph_deploy/hosts/centos/install.py

index 4a281b7235996511ae075fc7e3c9895791f36d11..8a6935dcc5083c8d203c6413e6ad8aab8721ba91 100644 (file)
@@ -2,6 +2,12 @@ from ceph_deploy.util import pkg_managers, templates
 from ceph_deploy.lib import remoto
 
 
+def rpm_dist(distro):
+    # start using the el7 prefix now that rhel7 exists.
+    if distro.normalized_name == 'redhat' and distro.release.startswith('7'):
+        return 'el7'
+    return 'el6'
+
 def repository_url_part(distro):
     """
     Historically everything CentOS, RHEL, and Scientific has been mapped to
@@ -31,6 +37,7 @@ def install(distro, version_kind, version, adjust_repos):
     release = distro.release
     machine = distro.machine_type
     repo_part = repository_url_part(distro)
+    dist = rpm_dist(distro)
 
     pkg_managers.yum_clean(distro.conn)
 
@@ -76,7 +83,7 @@ def install(distro, version_kind, version, adjust_repos):
                 'rpm',
                 '-Uvh',
                 '--replacepkgs',
-                '{url}noarch/ceph-release-1-0.el6.noarch.rpm'.format(url=url),
+                '{url}noarch/ceph-release-1-0.{dist}.noarch.rpm'.format(url=url, dist=dist),
             ],
         )