'Takes a single line and tries to parse it as a host definition. Returns
a list of Hosts if successful, or raises an error.'

def _parse_host_definition(self, line):

    try:
        tokens = shlex_split(line, comments=True)
    except ValueError as e:
        self._raise_error(("Error    parsing    host    definition    '%s':    %s" % (line, e)))
    (hostnames, port) = self._expand_hostpattern(tokens[0])
    variables = {}
    for t in tokens[1:]:
        if ('=' not in t):
            self._raise_error(('Expected    key=value    host    variable    assignment,    got:    %s' % t))
        (k, v) = t.split('=', 1)
        variables[k] = self._parse_value(v)
    return (hostnames, port, variables)
