'in case something did not update inventory correctly, fallback to group scan'

def _scan_groups_for_host(self, hostname, localhost=False):

    found = None
    for group in self.groups.values():
        for host in group.get_hosts():
            if (hostname == host.name):
                found = host
                break
        if found:
            break
    if found:
        display.debug(('Found    host    (%s)    in    groups    but    it    was    missing    from    main    inventory' % hostname))
    return found
