I think some cultures (maybe my own peops here in Lancaster County, PA) like to nail a coin onto a barn's structural pieces before putting on the outer boards.
Yes, that tradition goes back centuries, though to my knowledge, I am not aware of it having been done so much here in the South. Maybe, but since you Yankees burned most of our barns in that little spat we had a few years back, who knows? Here's a colonial-era (1731) George II halfpenny with a so-called "square nail" (actually rectangular) hole. You see this from time to time on colonial and early US coins. I used to have a Nova Constellatio copper with a rectangular nail hole, too, but can't find pix of it now. The Roosevelt dime in the OP definitely reminded me of this. I think in the distant past, people also nailed coins to ships' masts for luck.
I'm not aware of them nailing coins to the masts, but it is common practice to place coins below the mast when it is being set in place. Today it is done for luck but the practice goes back to the ancient Greeks. Burial customs then were to place a coin in the deceased persons mouth as payment to Charon to ferry the soul over the river Styx (I may be mixing up my Greek and Roman mythology names here) to the underworld. If you couldn't pay your fare your soul was condemned to wander the river bank for eternity and never enter the underworld. Well naturally a sailor lost at sea had no one to do that for him, so the coins under the mast were to pay Charon for passage for the souls of anyone lost when the ship went down.
My dad grew up in Aransas Pass, Texas in the 1930's. This is an old port city on the Gulf of Mexico. I remember him telling me that back then, when people got a new boat, they'd make a hole somewhere and place a coin in it. Then, they'd cover it and paint over it. He told me that was because if there was ever any dispute over the ownership, the rightful owner could have the coin taken out and he could tell the date of it without looking at it. I don't guess that a nail hole was made in the coin, though.
Neat piece, rectangular nails were used from 1800-1850, then the round nail was used. Before 1800 square nails were used.
I have a 1791 4 Reales Mexico silver coin with a hole in it from when people would put all their money on a string.
Yes, you're right. Usually it was underneath the mast. But I've heard of them being nailed to the mast, as well. I suspect both were true, though I have no documentary evidence for the latter except for the (fictional) citation in Moby Dick. Melville probably got that from real life, though, I would think, unless he was confusing the ancient tradition of a coin beneath a mast somehow. He did spend some time at sea aboard a real whaling ship.