'Return the mount point for path from ansible_mounts.'

@staticmethod
def find_ansible_mount(path, ansible_mounts):

    mount_for_path = {mount['mount']: mount for mount in ansible_mounts}
    mount_point = path
    while (mount_point not in mount_for_path):
        if (mount_point in ['/', '']):
            break
        mount_point = os.path.dirname(mount_point)
    try:
        return mount_for_path[mount_point]
    except KeyError:
        known_mounts = (',    '.join(('"{}"'.format(mount) for mount in sorted(mount_for_path))) or 'none')
        msg = 'Unable    to    determine    mount    point    for    path    "{}".    Known    mount    points:    {}.'
        raise OpenShiftCheckException(msg.format(path, known_mounts))
