Yep, those holes are constructed to trap insect legs so that the ants can race out and slowly rip apart the victim.
That is Allomerus decemarticulatus, a species of ant in the Amazon, and their elaborate trap system is possible thanks to their relationship with a certain kind of tree. The tree provides a good habitat for the ants, and the ants keep larger insects away from the tree by tearing the shit out of anything that touches it.
The ants get to work cultivating a special type of fungus, all by themselves, and then use it to build large, hollow platforms that big insects can easily climb (otherwise, they'll just slide off the surface). These structures are dotted with hundreds of tiny holes -- and inside each hole hides an ant, waiting for an opportunity to do this:
As soon as a bug steps into their fungus trap, ants will begin grabbing its limbs and pulling them in opposite directions as they sting it to death (which, oh yeah, is a thing ants can do). Small bugs are snatched away in seconds -- the bigger ones can stay up there for hours, slowly being torn into more manageable chunks. Eventually these contraptions look like miniature versions of a medieval torture tower.
Via BBC News
Awesome, it's whack-an-eldrich-horror-from-beyond time!