An adaptation of the technique used to keep ants off of hummingbird feeders should solve the problem.
[ You are not allowed to view attachments ]
Like a moat? Only potential problem is keeping water in it 24/7.
Exactly. I have found with the hummingbird feeders that after the ants give up, even if the moat dries out, they don't return immediately. If it was large enough it would take a while to evaporate. If it's a pipe out of the ground then refilling shouldn't be a problem as the moat doesn't have to be high up on the pole to work.
The double cap I use for the feeder came off a can of spray paint. Finding something that would slide over a pipe might be more challenging to find or fabricate.
But who knows, maybe these things already exist for pipes? Time to google.....