Ants I know ...
John,
I can appreciate everyone's concern about pesticides, etc. I will make one observation though, that being that most have not used pesticides to fix a problem such as yours, but rather are recommending against their use so as to err on the side of caution.
What I say is just my opinion, based on years of dealing with ants .... fire ants in particular, which are about as harmful as they come.
You concern with pesticides used outside the cage is whether or not transfer via ant to chameleon will occur. Direct transfer will not happen. A more legitimate concern is whether or not there are other feeder bugs outside the cage that may pick up the insecticide and carry it into the cage, such as crickets. In a very open cage, with larger bugs able to come and go freely, this might have merit. Most cages are not so. If you have a pretty high level of confidence that this essentially does not happen, then you can use insecticides.
I do recommend that you use either a spray or powder, but not a bait. The sprays in particular are fast acting, although powders create pretty good turmoil as well. You will need to be sure your room is well ventilated when you spray, and for several hours after, as you do not want the chemicals lingering in the air, only where you spray or dust. Start with every point of entry into the room for the ants. You may also want to spray along their routes, and I would deem it safe to within 2 feet of the cage. Use a cardboard barrier when you spray to insure no mist wafts to the cage itself when closer to the cage. One favorable reaction to ants once affected by the spray is that they abandon their mission, and any sprayed will no longer be heading to your chameleon's cage to plunder. Baits are trickier, and to use a different pest as an example, but rat bait is very problematic, as it can take 3-5 days to kill the animal, during which time it may fall prey to a different predator, such as a snake.
All of the other methods mentioned are good, but as you mention, ants are persistent and crafty. You will have to decide when to employ pesticides based on your desire or success using other methods. Hope this helps.