From: David Vossel Date: Mon, 30 Jun 2014 20:40:21 +0000 (-0400) Subject: Use proper rpm %dist postfix for rhel7 rpms X-Git-Tag: v1.5.8~6^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=95ca97d0e59d525472d7bd2db9373b725c61f09c;p=ceph-deploy.git Use proper rpm %dist postfix for rhel7 rpms --- diff --git a/ceph_deploy/hosts/centos/install.py b/ceph_deploy/hosts/centos/install.py index 4a281b7..8a6935d 100644 --- a/ceph_deploy/hosts/centos/install.py +++ b/ceph_deploy/hosts/centos/install.py @@ -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), ], )