From: Alfredo Deza Date: Tue, 23 Aug 2016 20:51:30 +0000 (-0400) Subject: [RM-17107] hosts.rhel: detect if a remote node is systemd with the is_systemd utility X-Git-Tag: v1.5.36~3^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8883162cba0d2f8050a51994cbe50471b4845ee4;p=ceph-deploy.git [RM-17107] hosts.rhel: detect if a remote node is systemd with the is_systemd utility Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/hosts/rhel/__init__.py b/ceph_deploy/hosts/rhel/__init__.py index 6ee4ccb..a86ad50 100644 --- a/ceph_deploy/hosts/rhel/__init__.py +++ b/ceph_deploy/hosts/rhel/__init__.py @@ -2,6 +2,7 @@ from . import mon # noqa from .install import install, mirror_install, repo_install # noqa from .uninstall import uninstall # noqa from ceph_deploy.util import pkg_managers +from ceph_deploy.util.system import is_systemd # Allow to set some information about this distro # @@ -23,6 +24,9 @@ def choose_init(module): if not module.conn.remote_module.path_exists("/usr/lib/systemd/system/ceph.target"): return 'sysvinit' + if is_systemd(module.conn): + return 'systemd' + return 'systemd' def get_packager(module):