Rango features a lot of staples of classic Westerns, including an appearance by a character who sounds convincingly like Clint Eastwood, but is the Spirit of the West really voiced by the noted Western star? He appears to Rango, a skittish chameleon house pet played by Johnny Depp, during a time of self-doubt and reflection when he's supposed to be protecting his town from outlaws, but has lost his sense of identity after becoming sheriff. Like a mirage, the Spirit of the West manifests from the desert riding a golf cart to offer the youngster advice and inspire him to be bold when all he wants is to blend in.
https://screenrant.com/rango-clint-eastwood-spirit-west-cameo-explained/