Here's a simple solution that lets you take both boards with you:
You're not allowed to walk around the hole, but clearly there must be some kind of a ledge on each side of the hole that you can use to support the end of a board on, even if it's too narrow to walk on. (Otherwise none of the answers work, and I'm fairly sure that the problem is unsolvable.) So just
place one board so that it reaches from the side you're on to one of the ledges, about halfway across. Pick up the second board and walk along the first to the ledge, then place the second board down so it reaches from the ledge to the other side. Step across to the second board (you can make the gap between the boards arbitrarily small, so this should not be a problem), pick up the first one and walk to the other side.
Ps. Note that this puzzle, as stated above, is a much simplified version of the classic moat-crossing problem. In the original problem, to which lorimer's answer would be a correct solution, the "hole" is actually an L-shaped corner in a moat, and you need to get from the outside to the inside corner of the L. This rules out "trivial" answers like mine and A.D.'s (but also prevents you from picking up both boards after you've crossed).