All kinds of things will act as a barrier to ants, your tansy being one:
One category is powdery things that clog up their spiracles (breathing pores), if they try to walk over them. This includes chalk line, baby powder, cleanser powder (like comet), bone meal. Make a ring of powder around what you want to keep them away from and they won't cross it. Vaseline (petroleum jelly) also works as long as it's not cold enough to harden it up so they can walk over it.
Another category is strong smelling things, including vinegar, cinnamon, black pepper, cayenne pepper, bay leaves, peppermint oil or other mints (tansy falls in here), cloves, garlic. Sprinkle your strong smelling stuff on and around what you want to protect from the ants. (Be careful with the vinegar, don't put it on your plants, it can burn or even kill them, if directly on the plant)
I think you are right that the holes in your plants are likely made by something else. I would guess some kind of insect. Aphids might do that and they secrete a sticky sweet substance ("honeydew") which attracts the ants. Have you checked closely for any insects (besides the ants)?