Stop a service on a remote host depending on the type of init system.
    Obviously, this should be done for RHEL/Fedora/CentOS systems.

    This function does not do any kind of detection.

def stop_service(conn, service='ceph'):
    """
    Stop a service on a remote host depending on the type of init system.
    Obviously, this should be done for RHEL/Fedora/CentOS systems.

    This function does not do any kind of detection.
    """
    if is_systemd(conn):
        # Without the check, an error is raised trying to stop an
        # already stopped service
        if is_systemd_service_active(conn, service):
            remoto.process.run(
                conn,
                [
                    'systemctl',
                    'stop',
                    '{service}'.format(service=service),
                ]
            )