def get_installed_hosts(hosts, callback_facts):
    installed_hosts = []

    # count nativeha lb as an installed host
    try:
        first_master = next(host for host in hosts if host.master)
        lb_hostname = callback_facts[first_master.connect_to]['master'].get('cluster_hostname', '')
        lb_host = \
            next(host for host in hosts if host.ip == callback_facts[lb_hostname]['common']['ip'])

        installed_hosts.append(lb_host)
    except (__HOLE__, StopIteration):
        pass

    for host in hosts:
        if host.connect_to in callback_facts.keys() and is_installed_host(host, callback_facts):
            installed_hosts.append(host)
    return installed_hosts
dataset/ETHPy150Open openshift/openshift-ansible/utils/src/ooinstall/cli_installer.py/get_installed_hosts