module.conn = conn
module.machine_type = machine_type
module.init = module.choose_init()
+ if module.normalized_name in ['fedora']:
+ module.packager = module.get_packager(module)
return module
from ceph_deploy.hosts.centos.install import repo_install # noqa
from install import install, mirror_install # noqa
from uninstall import uninstall # noqa
+from ceph_deploy.util import pkg_managers
# Allow to set some information about this distro
#
Returns the name of a init system (upstart, sysvinit ...).
"""
return 'sysvinit'
+
+
+def get_packager(module):
+ if module.normalized_release.int_major >= 22:
+ return pkg_managers.DNF(module)
+ else:
+ return pkg_managers.Yum(module)
from ceph_deploy.lib import remoto
from ceph_deploy.hosts.centos.install import repo_install, mirror_install # noqa
from ceph_deploy.util.paths import gpg
-from ceph_deploy.util import pkg_managers
def install(distro, version_kind, version, adjust_repos, **kw):
release = distro.release
machine = distro.machine_type
- if distro.normalized_release.int_major >= 22:
- packager = pkg_managers.DNF(distro)
- else:
- packager = pkg_managers.Yum(distro)
-
if version_kind in ['stable', 'testing']:
key = 'release'
else:
key = 'autobuild'
if adjust_repos:
- packager.install_priorities_plugin()
+ distro.packager.install_priorities_plugin()
# haven't been able to determine necessity of check_obsoletes with DNF
distro.conn.remote_module.enable_yum_priority_obsoletes()
logger.warning('check_obsoletes has been enabled for Yum priorities plugin')
distro.conn.remote_module.set_repo_priority(['Ceph', 'Ceph-noarch', 'ceph-source'])
logger.warning('altered ceph.repo priorities to contain: priority=1')
- packager.install(
+ distro.packager.install(
[
'ceph',
'ceph-radosgw'