From: Travis Rhoden Date: Tue, 4 Aug 2015 21:06:36 +0000 (-0700) Subject: [RM-12477] centos: more selective install of yum-plugin-priorities X-Git-Tag: v1.5.27~3^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=acfd25517a1117a4775e8bca72846e8f5f432698;p=ceph-deploy.git [RM-12477] centos: more selective install of yum-plugin-priorities Only install plugin if using Yum for repo_install and mirror_install. This is needed because Fedora re-uses these methods Signed-off-by: Travis Rhoden --- diff --git a/ceph_deploy/hosts/centos/install.py b/ceph_deploy/hosts/centos/install.py index 8dab18a..f24bec0 100644 --- a/ceph_deploy/hosts/centos/install.py +++ b/ceph_deploy/hosts/centos/install.py @@ -54,7 +54,7 @@ def install(distro, version_kind, version, adjust_repos, **kw): # Get EPEL installed before we continue: if adjust_repos: distro.packager.install('epel-release') - distro.packager.install_priorities_plugin() + distro.packager.install('yum-plugin-priorities') distro.conn.remote_module.enable_yum_priority_obsoletes() logger.warning('check_obsoletes has been enabled for Yum priorities plugin') if version_kind in ['stable', 'testing']: @@ -141,9 +141,10 @@ def mirror_install(distro, repo_url, gpg_url, adjust_repos, extra_installs=True, distro.conn.remote_module.write_yum_repo(ceph_repo_content) # set the right priority - distro.packager.install_priorities_plugin() + if distro.packager.name == 'yum': + distro.packager.install('yum-plugin-priorities') distro.conn.remote_module.set_repo_priority(['Ceph', 'Ceph-noarch', 'ceph-source']) - distro.conn.logger.warning('alter.d ceph.repo priorities to contain: priority=1') + distro.conn.logger.warning('altered ceph.repo priorities to contain: priority=1') if extra_installs and packages: @@ -198,11 +199,8 @@ def repo_install(distro, reponame, baseurl, gpgkey, **kw): # set the right priority if kw.get('priority'): - distro.packager.install_priorities_plugin() - logger.warning( - 'ensuring that {repo_path} contains a high priority'.format( - repo_path=repo_path) - ) + if distro.packager.name == 'yum': + distro.packager.install('yum-plugin-priorities') distro.conn.remote_module.set_repo_priority([reponame], repo_path) logger.warning('altered {reponame}.repo priorities to contain: priority=1'.format(