def get_host(hostfile):

    if not os.path.exists(hostfile):
        print """
        The hostnames couldn't be read from the webservers
        section of this file '{0}'.

        {1}
        """.format(hostfile, BYPASS_PHRASE)
        sys.exit(3)

    data = None
    with open(hostfile, 'r') as open_hostfile:
        data = open_hostfile.readlines()

    return data[1].strip()
Crudely parse hostname from hostfile
dataset/ETHPy150Open glenjarvis/ansible_tutorial/src/example_01/access_machine.py/get_host