def confirm_hosts_facts(oo_cfg, callback_facts):
    hosts = oo_cfg.hosts
    click.clear()
    message = """
A list of the facts gathered from the provided hosts follows. Because it is
often the case that the hostname for a system inside the cluster is different
from the hostname that is resolveable from command line or web clients
these settings cannot be validated automatically.

For some cloud providers the installer is able to gather metadata exposed in
the instance so reasonable defaults will be provided.

Plese confirm that they are correct before moving forward.

"""
    notes = """
Format:

connect_to,IP,public IP,hostname,public hostname

Notes:
 * The installation host is the hostname from the installer's perspective.
 * The IP of the host should be the internal IP of the instance.
 * The public IP should be the externally accessible IP associated with the instance
 * The hostname should resolve to the internal IP from the instances
   themselves.
 * The public hostname should resolve to the external ip from hosts outside of
   the cloud.
"""

    # For testing purposes we need to click.echo only once, so build up
    # the message:
    output = message

    default_facts_lines = []
    default_facts = {}
    for h in hosts:
        if h.preconfigured == True:
            continue
        try:
            default_facts[h.connect_to] = {}
            h.ip = callback_facts[h.connect_to]["common"]["ip"]
            h.public_ip = callback_facts[h.connect_to]["common"]["public_ip"]
            h.hostname = callback_facts[h.connect_to]["common"]["hostname"]
            h.public_hostname = callback_facts[h.connect_to]["common"]["public_hostname"]
        except __HOLE__:
            click.echo("Problem fetching facts from {}".format(h.connect_to))
            continue

        default_facts_lines.append(",".join([h.connect_to,
                                             h.ip,
                                             h.public_ip,
                                             h.hostname,
                                             h.public_hostname]))
        output = "%s\n%s" % (output, ",".join([h.connect_to,
                             h.ip,
                             h.public_ip,
                             h.hostname,
                             h.public_hostname]))

    output = "%s\n%s" % (output, notes)
    click.echo(output)
    facts_confirmed = click.confirm("Do the above facts look correct?")
    if not facts_confirmed:
        message = """
Edit %s with the desired values and run `atomic-openshift-installer --unattended install` to restart the install.
""" % oo_cfg.config_path
        click.echo(message)
        # Make sure we actually write out the config file.
        oo_cfg.save_to_disk()
        sys.exit(0)
    return default_facts
dataset/ETHPy150Open openshift/openshift-ansible/utils/src/ooinstall/cli_installer.py/confirm_hosts_facts