]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-17107] hosts.rhel: detect if a remote node is systemd with the is_systemd utility 417/head
authorAlfredo Deza <adeza@redhat.com>
Tue, 23 Aug 2016 20:51:30 +0000 (16:51 -0400)
committerAlfredo Deza <adeza@redhat.com>
Tue, 23 Aug 2016 20:51:30 +0000 (16:51 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph_deploy/hosts/rhel/__init__.py

index 6ee4ccb22ab2b7a6d26764c4d10a9d7506644919..a86ad509864d9c1d61e44d6e131e6086c502bc5a 100644 (file)
@@ -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):